i have my html like this
<p id="msgfail" hidden="hidden" >Theres an error processing ur request</p>
<p id="sucessmsg" hidden="hidden">Success fully update database</p>
when i click a button it triggers attempt to enter data to mysql database. and the corresponding p item is made visible. now my question is how do i make it dissapear again after a timeout ?
i tried it this way
if ($("#msgfail").is(":visible")) {
setTimeout(function() {$("#msgfail").hide();}, 3000);
}
Is something like this what you're thinking?
$("#msgfail").delay(3000).hide(1);
Docs for delay.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With