|File Size:||341 KB|
|Official Website:||Go to website|
positionSticky is a small jQuery plugin used to make any Html elements always stay visible as you scroll down the page. Please check
demos folder for more examples.
1. Include jQuery library and the positionSticky plugin at the bottom of your Html page.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="dist/jQuery.positionSticky.js"></script>
2. Create an Html element that will be sticky at the top of your web page while scrolling.
3. Call the plugin on the element and done.
4. Available options.
OffsetTop: Sets the distance that the sticky element will have from the top of viewport when it becomes sticky.
OffsetBottom: Sets the distance that the sticky element will have from the bottom of its container when it is positioned absolutely.
ElementWidth: Applies element's computed width to its inline styling so that when the element is positioned absolutely or fixed it doesn't lose its shape.