0
嘿我試圖重寫這段代碼的代碼,但它只能部分代碼是假設在其移動內容DIV同時移動框。內容div .c_right只會移動,但.icon-menu-2不會移動。我怎樣才能解決這個問題?下面是代碼:試圖重寫JavaScript的
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);
});
如何解決我的代碼?