jquery - Left navigation folds in even if current? -


i have left navigation animation on hover - can see here: http://www.wearewebstars.dk/frontend/test/boerneunivers2.html

if ex: click second navigation item, "li" class: current - when leaving "li" item, collapses - because of javascript, shouldnt os "current" li. in script hover function should triggered if li not current 1 - see script here:

$(".left-navigation ul li:not(.current)").hover(function( e ){       var ment = e.type=="mouseenter"; // boolean true/false      //alert(ment);       $(this).stop().animate({width: ment?'95%':35}, ment?100:0, function() {          $(this).find("span.nav-text").css({              display: ment? "inline-block" : "none"          });      });  }); 

your selector should this:

$(".left-navigation ul li:not('.current')") 

i think self-explanatory ;)

edit: try doing this:

$(".left-navigation ul li:not(.current)").hover(function(){     //mouseenter },function(){     //mouseout }); 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -