Hi All,
I do not consider myself proficient in jquery, which is why I used an open source script. I usually pick things up pretty quickly but I am having trouble adding a menu fade in and out delay to the code. I have found examples online, but I must be entering the code in the wrong spot, because I still can't get it to work.
Here is the jquery that currently runs the menu:
Ideally I would like a pretty quick fade into the menu on hover, and out on hover out, however, the most important part is the delay in which the sub menu stays active when the user hovers out.
Can someone show me the appropriate code and where it would be inserted into what I currently have?
Thanks!
Meebix
I do not consider myself proficient in jquery, which is why I used an open source script. I usually pick things up pretty quickly but I am having trouble adding a menu fade in and out delay to the code. I have found examples online, but I must be entering the code in the wrong spot, because I still can't get it to work.
Here is the jquery that currently runs the menu:
Code:
<head><!--Scripts Start Here--> <script src="http://localhost/joomla/templates/pub/jquery-1.3.2.min.js"></script> <!--Navigation--> <script type="text/javascript"> $(document).ready(function() { $("ul#topnav li").hover(function() { //Hover over event on list item $(this).css({ 'color' : '6FB900'}); //Add background color and image on hovered list item $(this).find("span").show(); //Show the subnav } , function() { //on hover out... $(this).css({ 'color' : 'none'}); //Ditch the background $(this).find("span").hide(); //Hide the subnav }); }); </script> <!--End Navigation--> <!--Scripts End Here--> </head>
Can someone show me the appropriate code and where it would be inserted into what I currently have?
Thanks!
Meebix
Comment