Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

jQuery setTimeout function

0 votes
25 views
added Sep 26 in jQuery by LC Marshal Lieutenant (14,830 points)
$(function() {
    // setTimeout() function will be fired after page is loaded
    // it will wait for 5 sec. and then will fire
    // $("#successMessage").hide() function
    setTimeout(function() {
        $("#successMessage").hide('blind', {}, 500)
    }, 5000);
});

 

2 Responses

0 votes
responded Sep 26 by LC Marshal Lieutenant (14,830 points)
setTimeout(function() {
  $('#successMessage').fadeOut('fast');
}, 30000); // <-- time in milliseconds

 

0 votes
responded Oct 31 by LC Marshal Lieutenant (14,830 points)
setTimeout(function(){
    var img = new Image(1,1);
    img.src = '/logo?ver=1&sid=fbca20f2aefe71348395e4e9d83f9393&t='+1540969935+1;
},0);

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...