Guest User

Untitled

a guest
Jan 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. var lastOpenItem = null;
  2. $(".nav li.HasSubMenu ul").each(function(i, el){
  3. $(this).data('originalHeight', $(this).height());
  4. $(this).css('width', $(this).width());
  5. })
  6. $(".nav li.HasSubMenu ul").css({height: '0px'});
  7. $(".nav li.HasSubMenu").hover(
  8. function () {
  9. $(this).addClass("hover");
  10. $(this).children('ul').eq(0)
  11. .css({visibility: 'visible', zIndex: 1000})
  12. .stop()
  13. .animate({
  14. height: $(this).children('ul').eq(0).data('originalHeight') + 'px'
  15. }, {queue:false, duration:500, easing: 'easeOutSine'});
  16.  
  17. }, function() {
  18. lastOpenItem = $(this);
  19. $(this).delay(200)
  20. .removeClass("hover")
  21. .children('ul').eq(0)
  22. .css({zIndex: 999})
  23. .stop()
  24. .animate({
  25. height: '0px'
  26. },{
  27. queue:false,
  28. duration:300,
  29. easing: 'easeInSine',
  30. complete: function() {
  31. $(this).css({visibility: 'hidden'});
  32. }
  33. }
  34. );
  35.  
  36. }
  37. );
Add Comment
Please, Sign In to add comment