方式一,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();
        });        
    });
});
作者 铁血 汉子 2017年2月27日
2024/03/28/09:29:23am 2017/2/27/8:56:32
0 1573