Javascript - Desconstructing menu

谁都会走 提交于 2019-12-25 05:23:14

问题


I have a menu with images that does an animation when the mouse is over one and out of the images (for each one).

The code is:

var nav = $('.menu');
nav.navs({
    useHash:true,
    defHash: '#!/page_splash',
    //myComm - Menus Hover In 
    hoverIn:function(li){
            $('a>span', li).stop().animate({'marginTop': -400},1000,'easeInOutExpo');
            $('a>strong',li).stop().animate({height:0},800,'easeInOutExpo');
    },
    //myComm - Menus Hover Out 
    hoverOut:function(li){
        if ((!li.hasClass('with_ul')) || (!li.hasClass('sfHover'))) {
            $('a>span', li).stop().animate({'marginTop': marOver},1600,'easeOutElastic');
            $('a>strong',li).stop().animate({height:414},1200,'easeOutBounce');
        }
    }
})
.navs(function(n){  

    $('#content').tabs(n);
});

But I need to do the function separately, one function for each item of the menu.

来源:https://stackoverflow.com/questions/13107048/javascript-desconstructing-menu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!