jquery - Awful flickering when hovering over a sub menu during transition -


i've got slight problem when hover on sub menu dropping down while it's in transition...it flickers terribly, bad... tried adding .stop didn't help, naturally many users hover down whilst effect in transition.... there's way stop this, i've built following...

http://jsfiddle.net/awxgy/3/

// menu hover functionality $(document).ready(function () {   $('nav li,#mini-menu li').hover(     function () {   //show submenu   $('.sub-nav', this).slidedown(400).stop;   $('.mini-nav', this).fadein(300).stop; },  function () {   //hide submenu   $('.sub-nav,.mini-nav', this).stop(true,true).fadeout(300);            }   );      // preserves nav hover state   $("nav ul li .sub-nav").each(function(i){ $(this).hover(function(){   $(this).parent().find("a").slice(0,1).addclass("navactive"); },function(){   $(this).parent().find("a").slice(0,1).removeclass("navactive"); });  }); }); 

if hover on link 4 > , enter sub menu whilst it's coming in you'll see mean.

this seems work ok - http://jsfiddle.net/awxgy/6/

firstly, .stop() requires paranthesis, since function. secondly, .stop() function should called before animations.. not after... $('.sub-nav', this).stop().slidedown(400); - not sure if solves problem b/c im not seeing it. putting stop after animation causes current 1 stop, not want.

i added stoppropagation() call eliminate "rolling over" of hover commands.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -