I have an alert box being shown in my webpage with the code :
Now I wish this alert box to stay for round about 2 seconds.
I have tried using :
<script>
$(".alert-message").alert();
window.setTimeout(function() { $(".alert-message").alert('close'); }, 2000);
</script>
This script tag is being used at the end of all the div tags used my webpage(.phtml file)
Problem is that I am able to close the alert bar by clicking the a href "x" button.
But I am not able to remove/disable/close this alert bar automatically after 2 seconds.
Anything wrong with my code ?
you can try this
DEMO