2.0.2 • Published 8 years ago

js-izzi-sticky v2.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

version

Izzi Sticky

A lightweight and simple plugin to have sticky stuff.


#Install

Using npm command, it’s as simple as this :

npm i -D izzi-sticky

If you use bower, you can just do

$ bower i izzi-sticky

Or you could just download the files on GitHub.

How to use

var izziSticky = new IzziSticky('[data-sticky');
<div data-sticky>This item will be sticky</div>

You can pass either a html object, or a selector in a string.

Check the demo files for an example.

Options

You can also pass options to the plugin to change it’s default settings, like this:

var izziSticky = new IzziSticky('[data-sticky]', {
	heightValue: 200 // 200px
	classIsSticky: 'is-sticky'
});

TODO

  • Add constraint element (an element to move within)
  • Add the possibility to define options in html data attribute
2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago