jQuery 动作延迟范例代码
<!DOCTYPE html><html><head> <style>div { position: absolute; width: 60px; height: 60px; float: left; }.first { background-color: #3f3; left: 0;}.second { background-color: #33f; left: 80px;}</style> <script src="http://code.jquery.com/jquery-1.7rc2.js"></script></head><body> <p><button>Run</button></p><div class="first"></div><div class="second"></div> <script> $("button").click(function() { $("div.first").slideUp(300).delay(800).fadeIn(400); $("div.second").slideUp(300).fadeIn(400); });</script></body></html>