Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var lastOpenItem = null;
- $(".nav li.HasSubMenu ul").each(function(i, el){
- $(this).data('originalHeight', $(this).height());
- $(this).css('width', $(this).width());
- })
- $(".nav li.HasSubMenu ul").css({height: '0px'});
- $(".nav li.HasSubMenu").hover(
- function () {
- $(this).addClass("hover");
- $(this).children('ul').eq(0)
- .css({visibility: 'visible', zIndex: 1000})
- .stop()
- .animate({
- height: $(this).children('ul').eq(0).data('originalHeight') + 'px'
- }, {queue:false, duration:500, easing: 'easeOutSine'});
- }, function() {
- lastOpenItem = $(this);
- $(this).delay(200)
- .removeClass("hover")
- .children('ul').eq(0)
- .css({zIndex: 999})
- .stop()
- .animate({
- height: '0px'
- },{
- queue:false,
- duration:300,
- easing: 'easeInSine',
- complete: function() {
- $(this).css({visibility: 'hidden'});
- }
- }
- );
- }
- );
Add Comment
Please, Sign In to add comment