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?
Docs for
delay.