How can I destroy a dialog box after a certaing amount of seconds?????
This is my code:
<script type="text/javascript">
$(function() {
$(".dialog-message").dialog({
modal: true,
buttons: {
Ok: function() {
$(this).dialog('close');
}
}
});
});
</script>
$(function() {
var dialog = $(".dialog-message").dialog({
modal: true,
buttons: {
Ok: function() {
$(this).dialog('close');
}
}
});
setTimeout(function(){
dialog.dialog('destroy');
},5000); // 5 seconds
});
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