SO i finally got my menu working. Works good in all browser except Firefox 3 (suprised?) problem is: On page load, my 1st mouse hover will not have the fadein effects(only the default instant appear) , it is only on my 2nd attempt onwards that the fadein works.
try adding in some code that starts the animation in the stopped part. So something like this
$(document).ready(function() { $('ul.menu li').hover(function() { //Hover over event on list item $(this).find('ul').hide();//start the animation here $(this).find('ul').fadeIn('fast'); //Show the subnav } , function() { //on hover out... $(this).find('ul').hide(); //Hide the subnav }); });
You might need to edit your css. maybe set the css to hide the nav and then the jquery to show it instead of hide it in my code above. I think the point is that you need to tell the jquery where to start. It might think the nav is hidden to start with and that's why it's not doing what you want
although i still have display:none is my css, i added a
$(document).ready(function() { $('ul.menu li').hover(function() { //Hover over event on list item $(this).find('ul').hide(); $(this).find('ul').fadeIn('fast'); //Show the subnav } , function() { //on hover out... $(this).find('ul').hide(); //Hide the subnav }); });
Is there anyway to make it not hide so fast when my hover is out? I know there is this hoverintent plugin but i'm trying not to use any plugin if i can add a simple line to make it happen.
problem is: On page load, my 1st mouse hover will not have the fadein effects(only the default instant appear) , it is only on my 2nd attempt onwards that the fadein works.
You might need to edit your css. maybe set the css to hide the nav and then the jquery to show it instead of hide it in my code above. I think the point is that you need to tell the jquery where to start. It might think the nav is hidden to start with and that's why it's not doing what you want
although i still have display:none is my css, i added a
$(document).ready(function() {
$('ul.menu li').hover(function() { //Hover over event on list item
$(this).find('ul').hide();
$(this).find('ul').fadeIn('fast'); //Show the subnav
} , function() { //on hover out...
$(this).find('ul').hide(); //Hide the subnav
});
});
Is there anyway to make it not hide so fast when my hover is out?
I know there is this hoverintent plugin but i'm trying not to use any plugin if i can add a simple line to make it happen.