Stickthis
Stickthis. A simple jQuery Plugin to fix whatever element to the top of the browser. No pretentions, just for fun.
Please, take this little demo as it is, a demo where I pretend to show to you the power of this plugin, but consider your own target before copy/paste the code.
Customizable
• You could change the name of the class that is going to be added to the element ('sticked' by default). Remember then to apply your styles to this new class.
• Customize or change the CSS files.
Usage
• Download or fork the repository.
• Include jQuery and the Javascript file minify or not in your HTML.
• Initialize the plugin
$(".your-element-selector").stickthis();
// some options are customizable $(".stickthis").stickthis({ classname : "sticked", // asgin the class you like the most complete : function(){ // callback console.log('callback CUSTOM'); } });
Credits
• Feel free to download, modify, break, use or destroy this plugin.