嘿,我正在尝试重写此代码,但它只能部分工作,假设代码在移动内容 div 的同时移动框。内容 div .c_right 只移动,但 .icon-menu-2 不移动。如何修复此代码?这是代码:
var timer;
$(".icon-menu-2").animate({marginRight: "30px", queue: false, duration: "slow", display: "toggle"});
$(".c_right").animate({marginRight: "215px", queue: false, duration: "slow", display: "toggle"}
, function () {
timer = setTimeout(function () {
$(".icon-menu-2").animate({marginRight: "-155px", queue: false, duration: "slow", display: "toggle"});
$(".c_right").animate({marginRight: "215px", display: "toggle"}, {queue: false, duration: "slow"})
}, 500);
});
如何修复我的代码?