我会使用setTimeout
和使用fadeIn
//you probably do not need to use setTimeout for .alpha, but just in case...
setTimeout(function() {
$('.alpha').fadeIn();
}, 100);
//then load .omega 2 seconds after .alpha...
setTimeout(function() {
$('.omega').fadeIn();
}, 2100);
更新以回答您的示例:
jQuery(document).ready(function() {
jQuery(window).load(function() {
//load in .alpha
setTimeout(function() {
$(".alpha").fadeIn("fast", function() {
//alpha finished loading
//now load omega
setTimeout(function() {
$(".omega").fadeIn("fast", function() {
//omega finished loading
})
}, 2000);
});
}, 500);
});
});