表示されているこのスクリプトを見るalert('hey');
と、ドキュメントの先頭に5回追加されています。問題はありませんが、一度だけ実現する方法を知りたいです。
$('#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);
}
});
}
});