jQuery countdown timer

后端 未结 3 1361
难免孤独
难免孤独 2020-12-02 19:34

Currently i have this code

setTimeout(function() { $(\'#hideMsg\').fadeOut(\'fast\'); }, 2000);

is it possible for me to put countdown time

3条回答
  •  旧时难觅i
    2020-12-02 19:52

    Do another set timeout after a second and set the .html() of the div like this:

    setTimeout(function() { $('#hideMsg').html('The entry you posted not valid. 
    This Box will Close In 1 Second'); }, 1000);

    Put them in a function and run the function onload like this:

    
    

    hope this helps.

提交回复
热议问题