Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 h2 上的淡入和淡出效果之后附加 h3。我试过但我没有得到。信任
$(function(){ var jj= ['<h1>text1</h1>','<h2>text2</h2>','<h3>text3</h3>']; $.each(jj, function(i){ $('body').append(jj[i]) $('h2').fadeOut('slow').fadeIn('fast') }) })
像这样??
var jj= ['<h1>text1</h1>','<h2>text2</h2>','<h3>text3</h3>']; $('body').append(jj[0]); $('body').append(jj[1]); $('h2').fadeOut('slow').fadeIn('fast', function(){ $('body').append(jj[2]); });