I have a function with a timer, I want to call another function when the timer of the another function is done, so the first function will show a modal for 3 seconds, and the another funciton will show another modal, here is my code:
var fn = setTimeout(function(){
$('#responseModal').modal('hide');
return true;
}, 3000);
if(fn)
$('#requestModal').modal('show');
Wouldn't
setTimeout(function(){
$('#responseModal').modal('hide');
$('#requestModal').modal('show');
}, 3000);
do the trick?
No need to return anything in the callback function for setTimeout. It's meaningless.
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