jquery滑块从两个方向切换

jquery滑块从两个方向切换,jquery,Jquery,我有一个jquery函数,它的作用是profiles包含从下到上然后从上到下的幻灯片。但是,当它滑动时,它会从顶部和底部两个方向打开,而我希望它是从底部到顶部和从顶部到底部的平滑滑动 $(document).ready(function(){ $("#profilelink").toggle( function(){ $("#profilelink").animate({"top": "237px"}, "slow");

我有一个jquery函数,它的作用是profiles包含从下到上然后从上到下的幻灯片。但是,当它滑动时,它会从顶部和底部两个方向打开,而我希望它是从底部到顶部和从顶部到底部的平滑滑动

  $(document).ready(function(){
            $("#profilelink").toggle( function(){
                    $("#profilelink").animate({"top": "237px"}, "slow");
                    $("#profilees").animate({"height": "290px", "top": "-165px"}, "slow");
                    //$("#newses").animate({"height": "310px"}, "slow");
                    $("#profilecontain").animate({"height": "270px", 'top': '-154px'}, "slow");
            }, function(){
                    $("#profilelink").animate({"top": "527px"}, 'slow');
                    $("#profilees").animate({"height": "0px", "top": "8px"}, 'slow');
                    $("#profilecontain").animate({"height": "0px", "top": "0px"}, 'slow');
            });
        });

你能把它放在JSFIDLE中吗?我对jquery了解不多,最近才学的。你可以在www.webtofun.com/index.phpdone上查看我的问题,如果有人遇到类似的问题,那只是因为像素计算错误