1 2 3 4 5 6 7 8 9 10
var hoverTimeout, $navBg = $('.nav-bg'); $('.sf-menu > li').hover(function() { clearTimeout(hoverTimeout); $navBg.stop().animate({ opacity: 1 }, 'fast'); }, function() { hoverTimeout = setTimeout(function() { $navBg.stop().animate({ opacity: 0 }, 'fast'); }, 1200);
You can clone a snippet to your computer for local editing. Learn more.