Smint jQuery Plugin Helps You to Make Sticky Menu

Smint jQuery plugin helps you to make sticky menu. This can be added to any website by making use of simple jQuery script.  Smint jQuery plugin came up with two different parts the one that stays on the top of the page (much like Sticky Notification Bar) while the rest of content scrolls as the user scroll.

Smint jQuery plugin

How Smint Works?

If you are trying to use Smint, simply Download it.

Now load the jquery.smint.js downloaded file and jquery.js file in the <head> section of your website where you want to create sticky menu.

At first place, you need to create a ‘div’ for your menu and give it a class name

Inside this you put your ‘a’ tags and give each one an #id. This is your menu wrapper and it should be set to position:absolute

Next, add a class to each of the sections of your one page site. The class names must match the #ids of the ‘a’ links you created above. So if your first link has an id of #section1 you then add the class .section1 to your first div. Repeat this for each link you have.

Finally, call the function using the following line of codes:

$(document).ready( function() {
 $('.subMenu').smint();
 });
You can replace .subMenu with the class name of your menu

To give you a little more flexibility, the class.fxd gets added to your menu when it becomes fixed at the top of the screen, enabling some more extra styling to be added if necessary.

Options

SMINT jQuery plugin has only an option for how fast the page scrolls.

$('.subMenu').smint({
 'scrollSpeed' : 1000
 });

However the default speed is 500 which is referred to as half a second but you can set that to be whatever you like.

Demo

Similar Posts

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *