This plugin's purpose is to avoid getting lost when content is added to the page.
Click on the "eye" button to show hidden kittens on the page.
The plugin will avoid the page to scroll and what was in the middle of the screen will stay there.
<!-- add the "stay-still" class to the elements you want to keep still --> <div class="container"> <div class="stay-still"> content1 </div> <div class="stay-still"> content2 </div> <!-- more elements --> </div>
// call the saveState method juste before changing the page content $(".container").stayStill('saveState'); // do something here like adding elements to the page // call the resetState method just after changing the page content (in a callback if your changes are async) $(".container").stayStill('resetState');
This is my second open source project.
Feel free to make comments, raise bugs and ask for features.
This plugin is used on skipass.com but on an admin only page.
I'd be glad to know if you use it.
You could be interested by my other plugin which offers a intuitive way to sort elements in a page :