how to properly use .stop() ???
Hello!
On this page:
http://www.arvag.net/old/smsbox.de/
when you hover over "Informationen" and "Über uns" you get sub menu shown. When you move mouse away it hides. Normally i have problem with jquery making queue for every single hover i make, and then i just keeps on animating all those hovers. I tried to implement stop() but just cant get it to work properly.
This is the code i am using:
- <script type="text/javascript">
- //<![CDATA[
- $(function(){
- $('#nav_menu > .center > ul > li').hover(function() {
- $(this).children('ul').slideToggle('slow');
- },function(){
- $(this).stop(true,true).children('ul').slideToggle('slow');
- }).click(function(){
- return false;
- });
- });
- //]]>
- </script>
Thanks!