{"_id":"jquery-sticky","_rev":"8-fc401138fba01218c4eb150fd459c5e1","name":"jquery-sticky","description":"Sticky is a jQuery plugin that gives you the ability to make any element on your page always stay visible.","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.3":{"name":"jquery-sticky","version":"1.0.3","description":"Sticky is a jQuery plugin that gives you the ability to make any element on your page always stay visible.","main":"jquery.sticky.js","files":["jquery.sticky.js"],"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/garand/sticky.git"},"keywords":["dom","jquery-plugin","ui"],"author":{"name":"Anthony Garand"},"license":"(MIT OR GPL-3.0)","bugs":{"url":"https://github.com/garand/sticky/issues"},"homepage":"https://github.com/garand/sticky#readme","dependencies":{"jquery":"*"},"gitHead":"500214945f1586065781cff509a4c4445c7d07d2","_id":"jquery-sticky@1.0.3","_shasum":"d51aa750b36787675a90458f47452e208e7fa01e","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.7","_npmUser":{"name":"garand","email":"garand@garand.me"},"dist":{"shasum":"d51aa750b36787675a90458f47452e208e7fa01e","tarball":"https://registry.npmjs.org/jquery-sticky/-/jquery-sticky-1.0.3.tgz","integrity":"sha512-fdiKmnId+dMC6kPPfUXhbDGnMG9sYrW0UrtDVUotxeyHulc3Bk3U1/nMOHnFrCGuKnndd9lg08bNDCrGArE31w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDhJPzGBKAbQZfAIaRx6WXhjYriSDdpDivmVoXJiy+eUAiB0aetSkoeBFVpFPFX+SH5xcIpFGr22dc9YxPXEpIcCMQ=="}]},"maintainers":[{"name":"garand","email":"garand@garand.me"}]},"1.0.4":{"name":"jquery-sticky","version":"1.0.4","description":"Sticky is a jQuery plugin that gives you the ability to make any element on your page always stay visible.","main":"jquery.sticky.js","files":["jquery.sticky.js"],"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/garand/sticky.git"},"keywords":["dom","jquery-plugin","ui"],"author":{"name":"Anthony Garand"},"license":"(MIT OR GPL-3.0)","bugs":{"url":"https://github.com/garand/sticky/issues"},"homepage":"https://github.com/garand/sticky#readme","dependencies":{"jquery":"*"},"gitHead":"4949b8586fbdb0f846b361b579a2aed93317fba8","_id":"jquery-sticky@1.0.4","_shasum":"2fe8d03dc904685340daa12cbdd1ca0c921b09ac","_from":".","_npmVersion":"3.8.3","_nodeVersion":"5.10.1","_npmUser":{"name":"garand","email":"garand@garand.me"},"dist":{"shasum":"2fe8d03dc904685340daa12cbdd1ca0c921b09ac","tarball":"https://registry.npmjs.org/jquery-sticky/-/jquery-sticky-1.0.4.tgz","integrity":"sha512-AdeFsrufKRBf1yPVK2O7FRvbVCJnaiq4X100afPXOr5WoBICU8ENhsuB+gHYCh0w4GVGvSZcssWB0ehpq0u6aw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBSvUxxZp4vSJAHDNAxmvUH2JyS7xVXxaNuZAax70MOhAiEAzeq50hPjs4nruUaG2yVd87hZzhxQ3BQFGnoiYBr8eVY="}]},"maintainers":[{"name":"garand","email":"garand@garand.me"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/jquery-sticky-1.0.4.tgz_1461163454367_0.3868325494695455"}}},"readme":"# Sticky\n\nSticky is a jQuery plugin that gives you the ability to make any element on your page always stay visible.\n\n## Sticky in brief\n\nThis is how it works:\n\n- When the target element is about to be hidden, the plugin will add the class `className` to it (and to a wrapper added as its parent), set it to `position: fixed` and calculate its new `top`, based on the element's height, the page height and the `topSpacing` and `bottomSpacing` options.\n- That's it. \nIn some cases you might need to set a fixed width to your element when it is \"sticked\".\nBut by default (`widthFromWrapper == true`) sticky updates elements's width to the wrapper's width.\nCheck the `example-*.html` files for some examples.\n\n## Usage\n\n- Include jQuery & Sticky.\n- Call Sticky.\n\n```html\n<script src=\"jquery.js\"></script>\n<script src=\"jquery.sticky.js\"></script>\n<script>\n  $(document).ready(function(){\n    $(\"#sticker\").sticky({topSpacing:0});\n  });\n</script>\n```\n\n- Edit your css to position the elements (check the examples in `example-*.html`).\n\n- To unstick an object\n\n```html\n<script>\n  $(\"#sticker\").unstick();\n</script>\n```\n\n## Options\n\n- `topSpacing`: (default: `0`) Pixels between the page top and the element's top.\n- `bottomSpacing`: (default: `0`) Pixels between the page bottom and the element's bottom.\n- `className`: (default: `'is-sticky'`) CSS class added to the element's wrapper when \"sticked\".\n- `wrapperClassName`: (default: `'sticky-wrapper'`) CSS class added to the wrapper.\n- `center`: (default: `false`) Boolean determining whether the sticky element should be horizontally centered in the page.\n- `getWidthFrom`: (default: `''`) Selector of element referenced to set fixed width of \"sticky\" element.\n- `widthFromWrapper`: (default: `true`) Boolean determining whether width of the \"sticky\" element should be updated to match the wrapper's width. Wrapper is a placeholder for \"sticky\" element while it is fixed (out of static elements flow), and its width depends on the context and CSS rules. Works only as long `getWidthForm` isn't set.\n- `responsiveWidth`: (default: `false`) Boolean determining whether widths will be recalculated on window resize (using getWidthfrom).\n- `zIndex`: (default: `auto`) controls z-index of the sticked element.\n\n## Methods\n\n- `sticky(options)`: Initializer. `options` is optional.\n- `sticky('update')`: Recalculates the element's position.\n\n## Events\n\n- `sticky-start`: When the element becomes sticky.\n- `sticky-end`: When the element returns to its original location\n- `sticky-update`: When the element is sticked but position must be updated for constraints reasons\n- `sticky-bottom-reached`: When the element reached the bottom space limit\n- `sticky-bottom-unreached`: When the element unreached the bottom space limit\n\nTo subscribe to events use jquery:\n\n```html\n<script>\n  $('#sticker').on('sticky-start', function() { console.log(\"Started\"); });\n  $('#sticker').on('sticky-end', function() { console.log(\"Ended\"); });\n  $('#sticker').on('sticky-update', function() { console.log(\"Update\"); });\n  $('#sticker').on('sticky-bottom-reached', function() { console.log(\"Bottom reached\"); });\n  $('#sticker').on('sticky-bottom-unreached', function() { console.log(\"Bottom unreached\"); });\n</script>\n```\n","maintainers":[{"name":"garand","email":"garand@garand.me"}],"time":{"modified":"2022-06-19T05:13:06.114Z","created":"2015-08-17T17:18:21.426Z","1.0.3":"2015-08-17T17:18:21.426Z","1.0.4":"2016-04-20T14:44:16.463Z"},"homepage":"https://github.com/garand/sticky#readme","keywords":["dom","jquery-plugin","ui"],"repository":{"type":"git","url":"git+https://github.com/garand/sticky.git"},"author":{"name":"Anthony Garand"},"bugs":{"url":"https://github.com/garand/sticky/issues"},"license":"(MIT OR GPL-3.0)","readmeFilename":"README.md","users":{"blamejen":true,"filipve":true,"deneboulton":true,"claytoncollie":true}}