我無法弄清楚如何讓這段代碼正常工作。從這個代碼塊意外標識符:Javascript
complete:function() {
::我recieving爲線意外標識符
$(document).ready(function(){
var doorOpen = false;
$("a[href=#andrew]").click(function() {
if (doorOpen) { // set animation duration for door close, based on actually needed to animate the door closed or not
var duration = 1500;
} else {
var duration = 0;
}
$("#rightdoor,#leftdoor").animate(
{"marginLeft":"0px"},
{duration:duration},
complete:function() {
$('.pic2 .pic3 .pic4 .pic5').css('zIndex', 1); //puts wrong pics in back
$('.pic1').css('zIndex', 2); //brings right pic into view
$('#rightdoor').animate({ //opens doors again
marginLeft: "150px",
}, 1500);
$('#leftdoor').animate({
marginLeft: "-150px",
}, 1500);
}
);
doorOpen = true;
return false;
});
});
我是新來的Javascript所以我可能失去了一些東西很明顯這裏..
謝謝你,我做了一個改變,但仍然正在一個「意外的標記」爲完成:函數(){行 –
在哪個瀏覽器? –
查看我的版本。 –