Advertisement
Guest User

drop down nav jquery

a guest
Aug 26th, 2011
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     $(function() {
  2.         $('ul.sub-menu').hide();
  3.         $('.sub-menu ul').hide();
  4.        
  5.     var second_lvl_timer;
  6.     $('#menu-navigation li').hover(function(){
  7.         second_lvl_timer = setTimeout(function () {
  8.             $(this).children('ul').slideDown("fast");
  9.         }, 500);
  10.     },
  11.     function(){
  12.         clearTimeout(second_lvl_timer);
  13.         $(this).children('ul').hide();
  14.     });
  15.            
  16.     var third_lvl_timer;
  17.     $('#menu-navigation ul li').hover(function(){
  18.         clearTimeout(third_level_timer);
  19.         $(this).children('ul').slideDown("fast");
  20.     },
  21.     function(){
  22.         third_lvl_timer = setTimeout(function () {
  23.             $(this).children('ul').hide();
  24.         }, 500);
  25.     });
  26.        
  27.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement