Jquery, Div in view / link hover, fixed menu “pop out”

Hulkblili

New Member
I am using the following code for a fixed side menu that pops out on hover. Code found online, and easily integrated..CSS:\[code\]<div id="nav"> <ul class="nav"> <li class="home"><a class="home" href="http://stackoverflow.com/questions/15858885/#home">Home</a></li> <li class="museum"><a class="museum" href="http://stackoverflow.com/questions/15858885/#museum">Museum</a></li> <li class="collection"><a class="collection" href="http://stackoverflow.com/questions/15858885/#collection">Collection</a></li> <li class="timeline"><a class="timeline" href="http://stackoverflow.com/questions/15858885/#timeline">Timeline</a></li> <li class="contact"><a class="contact" href="http://stackoverflow.com/questions/15858885/#contact">Contact</a></li> </ul> <div class="clear"></div></div>\[/code\]JQuery:\[code\]// link hover$(function() { $('.nav a').stop().animate({'marginLeft':'-140px'},200); $('.nav > li').hover( function () { $('a',$(this)).stop().animate({'marginLeft':'-45px'},200); }, function () { $('a',$(this)).stop().animate({'marginLeft':'-140px'},200); } );});\[/code\]And I use the PlusAnchor script to scroll the page to the right divs:\[code\]// Page Scroll$('body').plusAnchor({ easing: 'easeInOutExpo', speed: 1000, offsetTop: -60});\[/code\]Now I need to modify the code, but I don't know how being new to Jquery. I need for the menu items to remain "popped out" after a user clicks, or to "pop out" as the user scrolls and the div in question comes in to view.How can I achieve this? Is there a script I can adopt?
 
Back
Top