方式一,setTimeout:
$(document).ready(function() {
function showpanel() {
$(".navigation").hide();
$(".page").children(".panel").fadeIn(1000);
}
setTimeout(showpanel, 1000)
});
方式二,queue:
function showImage(){
$("img").fadeIn(500);
}
$(document).ready(function(){
$(".show-image").click(function(){
$(this).text('loading...').delay(1000).queue(function() {
$(this).hide();
showImage(); //calling showimage() function
$(this).dequeue();
});
});
});
