jQuery Animate无法正常工作

| 由于某种原因,我似乎无法使.animate正常运行。有人知道为什么吗? 我正在用这个 集装箱部门
#valve-menu {
    position: absolute;
    width: 780px;
    top: 200px;
    background-color: #9C3;
    margin-right: 9px;
    margin-left: 10px;
}
然后..
#control-cover{
    height: 50px;
    width: 180px;
    overflow: hidden;
    position: absolute;
    }
#control{
    background-color: #0C9;
    height: 200px;
    width: 180px;
    margin-right: 10px;
    position: absolute;
    }
我的Jquery是这个
$(document).ready(function(){

    //When mouse rolls over
    $(\"#control-cover\").mouseover(function(){
        $(this).stop()
               .animate({height:\'150px\'},
                        {queue:false, duration:600, easing: \'easeOutBounce\'})
    });

    //When mouse is removed
    $(\"#control-cover\").mouseout(function(){
        $(this).stop()
               .animate({height:\'50px\'},
                        {queue:false, duration:600, easing: \'easeOutBounce\'})
    });

});
我想部分隐藏控件div,然后onmouseover扩展。     
已邀请:
可以了如果您不使用Easing插件,则默认情况下,jQuery Swing和Linear中只有两个可用: 从jQuery网站http://api.jquery.com/animate/   缓和      .animate()的其余参数   是一个命名缓动函数的字符串   使用。缓动函数指定   动画的速度   在不同的地方进步   动画。唯一的宽松   jQuery库中的实现   是默认的,称为swing,还有一个   以恒定的速度前进   称为线性。更多缓动功能   可以使用   插件,最著名的是jQuery UI   套房。
    $(document).ready(function(){

        //When mouse rolls over
        $(\"#control-cover\").bind(\'mouseover mouseenter\',function(){
            $(this).stop()
            .animate({height:\'150px\'},
            {queue:false, duration:600, easing: \'swing\'})
        });

        //When mouse is removed
        $(\"#control-cover\").bind(\'mouseout mouseleave\',function(){
            $(this).stop().animate({height:\'50px\'},
            {queue:false, duration:600, easing: \'swing\'})
        });

    });
    
jQuery中的
$(\'#control-over\')
选择器将在您的html中搜索ID为
control-over
的元素,例如
<div id=\"control-over\">
。从代码示例中,您似乎有一个名为called5ѭ的CSS类。两者不一样。 您需要将
id=
属性添加到html元素中,或通过类名搜索元素,例如
$(\'.control-over\')
。     

要回复问题请先登录注册