I’m developing a new Joomla 2.5 website and I have to implement a fade effect on the menu for the first level of li only.
Site url: http://goo.gl/Eu9Mt
I added this effect but I have a problem on “Google Chrome” & “Safari” only. When I hover the mouse on a sub menu and move the mouse away but without hover the parent menu the fade effect still exist but when I move the mouse away and the last item I hovered was the parent item, the fade effect execute correctly.
here is my jQuery code:
(function($){
$(document).ready(function () {
$('#ja-mainnav ul.level0 li').not('#ja-mainnav ul.level0 li ul li').append('<div class=\'hover\'><div><\/div><\/div>');
$('#ja-mainnav ul.level0 li').not('#ja-mainnav ul.level0 li ul li').hover(
function() {
$(this).children('div').stop(true, true).fadeIn('1000');
},
function() {
$(this).children('div').stop(true, true).fadeOut('fast');
}).click (function () {
$(this).addClass('selected');
});
});
})(jQuery);
Please advise
add this on your css:
to add a transition with pure css, you can apply this on the hover stage (for example):
no IE support I’m afraid
hope this helps