jQuery Sliding Menu
In the head section add the following code:
<link rel="stylesheet" href="stylesheets/jquery.sliding-menu.css" type="text/css" media="screen" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> <!-- jQuery UI is Optional. Its only required if using easing functions. --> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script> <script type="text/javascript" src="javascripts/jquery.sliding-menu.js"></script> <script type="text/javascript"> jQuery(function(){ jQuery('#HorizontalSlidingMenu .SlidingMenu').slidingMenu(); jQuery('#VerticalSlidingMenu .SlidingMenu').slidingMenu({ initialOpacity: 0.5 }); }); </script>
Add the form in the body as shown below
<div id="HorizontalSlidingMenu"> <ul class="SlidingMenu Horizontal"> <li><a href="#">First Link</a></li> <li><a href="#">Second Link</a></li> <li><a href="#">Third Link</a></li> <li><a href="#">Fourth Link</a></li> <li><a href="#">Fifth Link</a></li> </ul> </div> <div id="VerticalSlidingMenu"> <ul class="SlidingMenu"> <li><a href="#">First Link</a></li> <li><a href="#">Second Link</a></li> <li><a href="#">Third Link</a></li> <li><a href="#">Fourth Link</a></li> <li><a href="#">Fifth Link</a></li> </ul> </div>
That’s it you are done!
For advanced users:
backgroundClass | Class of the moving background (Default: “Background”) |
initialOpacity | Opacity of the moving background (Default: 1) |
slideSpeed | Speed at which the background should slide (Default: 1, should be a fraction less than 1 which is max speed) |
easing | Type of easying with which the background should slide (Default: “linear”, must include jQuery UI core for this to work) |
callback | Callback of the sliding menu event (Default: “”) |
backgroundContent | HTML for moving background (Default: “<div></div>”) |
activeClass | Class for the clicked link (Default: “ActiveLink”) |
highlightOnClick | Tells whether the menu item should get highlighted on clicking it (Default: false) |
Hope you liked the plugin.
You might also like
Tags
accordion accordion menu animation navigation animation navigation menu carousel checkbox inputs css3 css3 menu css3 navigation date picker dialog drag drop drop down menu drop down navigation menu elastic navigation form form validation gallery glide navigation horizontal navigation menu hover effect image gallery image hover image lightbox image scroller image slideshow multi-level navigation menus rating select dependent select list slide image slider menu stylish form table tabs text effect text scroller tooltips tree menu vertical navigation menu