Simple jQuery Plugin For Responsive Sticky Elements - Stuck

Simple jQuery Plugin For Responsive Sticky Elements - Stuck
File Size: 1.85 MB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Stuck is a simple jQuery plugin which allows you to responsively make any Html element sticky as you scroll down the page.

How to use it:

1. Include jQuery Javascript library and the jQuery stuck plugin in the document.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="src/jquery.stuck.js></script>

2. Add the CSS class 'stuck' to any Html element that will be sticky on your web page.

<div class="stuck">
  ...
</div>

3. Initialize the plugin and we're done.

$(document).ready(function(){
  $(window).stuck();
});

4. More examples to learn about the sticky plugin.

Change log:

2016-03-09

  • added styles

2014-09-10

  • Doc and demo pages updated.

2014-08-29

  • Make branding box responsive, add docs and download buttons to main page, title the docs page
  • Add margins example, break docs and main page apart, update readme, bump version for link updates

This awesome jQuery plugin is developed by alextaujenis. For more Advanced Usages, please check the demo page or visit the official website.