jQuery Navigation Slider - Delay and Optimization -


with limited jquery skills have managed navigation slider move based on navigation hover. feel code not optimal , delay when moving between navigation items long. (reducing delay in javascript not help). thoughts or suggestions?

$('#navtop .home').mouseover(function () {  $('.navslider').animate({     marginleft: '54px',  }, 200, function () {     // animation complete.  }); }); ... 

http://jsfiddle.net/wtcnv/

http://jsfiddle.net/mohammadadil/wtcnv/1/

you need call .stop() -

$('.navslider').stop().animate({         marginleft: '54px',     }, 300, function () {         // animation complete. }); 

http://api.jquery.com/stop/


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -