如果通過腳本的這一部分看到alert('hey'),那麼它在文檔的頭部追加五次......它不會引起任何問題,但我想知道如何讓它只發生一次?.append()只有一次?它在頭部追加五次
$('#logo').fadeIn(2000, function() {
$(this).animate({ top: "-=20px" },{
duration: 1000,
specialEasing: {top: 'easeOutQuad', left: 'easeInQuad'},
complete: function() {
$(this).animate({ top: "63px" },{
duration: 1000,
specialEasing: {top: 'easeOutQuad', left: 'easeInQuad'},
complete: function() {
}
});
$('.home,.about,.investments,.media,.contact').animate({ top: "+=106px" },{
duration: 2000,
specialEasing: {top: 'easeOutQuad', left: 'easeOutQuad'},
complete: function() {
$('#ballTarp').remove();
$("head").append('<link href="css/hoverStates.css" rel="stylesheet" type="text/css">');
alert('hey');
$('#ball').removeClass('home').addClass('activeHome');
$('.activeTitle').fadeIn("fast");
$('.dropShadow').fadeIn(7000);
$('footer').fadeIn("fast");
$('.title').fadeIn("slow");
$('.login').fadeIn(3000);
}
});
}
});
WOW我驚奇自己有時 – DJERock
所以,是的,事情是否需要它發生動畫的一部分完成後,是否有任何可能的方法來保持它不發生變化而不改變選擇器 – DJERock