Unstable jQuery Navigation -


there issue jquery navigation. hasn't got usual setup of navigation (ul > li > ul etc). i've got jsfiddle right here: http://jsfiddle.net/rmrgh/2/
if more handy place code in topic instead of jsfiddle, let me know , i'll paste in here ;).

the css bit of mess, job =). because of underlaying cms(joomla) i'm forced use setup.

the navigation seems unstable , dont have enough jquery-knowledge figure out why.

when hover on items, quite fast 1 another. menu become impossible use because slides right away. fiddle , you'll see i'm talking (quite hard explain).

i'm unable figure out source of problem , how resolve it. hoping people here @ stackoverflow me out.

thanks in advance!

i updated fiddle: http://jsfiddle.net/rmrgh/6/

seems problem missing cleartimeout() in jquery('#nav li').hover(function(){}..) caused timeout continue if hovered menu again, closing it.

here's code:

jquery(document).ready(function(){      var timer;     var hover;      jquery('.moduletable-subnav > ul').hide();      jquery('#nav li').hover(         function(){             var id = jquery(this).attr('data-number');             jquery('.moduletable-subnav > ul').slideup();             jquery('#submenu-'+id).stop().slidedown();             cleartimeout(timer);         },         function(){             var id = jquery(this).attr('data-number');             timer = settimeout(function() { jquery('#submenu-'+id).slideup(); },1000);         }     );      jquery('.moduletable-subnav ul').hover(         function(){             cleartimeout(timer);         },         function(){             var id = jquery(this).attr('id');             timer = settimeout(function() { jquery('#'+id).slideup(); },1000);         }     ); }); ​ 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -