Jquery delay not working correctly

后端 未结 4 1624
南旧
南旧 2021-01-28 23:46

I want to create a delay between these two messages:

$(\'#submit-account\').html(animation + \'Submitting Data\')
$(\'#submit-account\').html(animation + \'Valid         


        
4条回答
  •  情话喂你
    2021-01-29 00:27

    make sure the #submit-account is hidden already.

    instead of your code you can try this

    $('#submit-account').html(ani + "Wait").fadeIn(5000);
    
    
     $('#submit-account').html(ani + "Done").fadeIn(5000);
    

    This will control the speed of the fadein effect. or if you want the div to be fadein after some time, you can use the setTimeOut() function.

    Hope this will help you

提交回复
热议问题