我制作了这个简单的 jQuery 脚本,但我有一个小问题。在我将我的第一个 div 淡出之后,我的第二个淡入淡出不起作用,因为 div 已经在那里......我已经尝试用更多毫秒来减慢淡入淡出,但它没有用。这是我的脚本。
$("#nothing > h1").click(function(){
$(this).fadeOut(1000);
$("#social").fadeIn(1000);
});
这是我的 HTML
<div id="nothing">
<h1>Click here.</h1>
</div>
<div id="social">
<h2>Nothing to see here</h2>
</div>
谢谢!