Answer: Here is a simple code for alert events in java script .
Javascript :
<script type="text/javascript">
$(document).ready(function () {
$("#Success").on('close.bs.alert', function () {
alert("This Alert box is being closed.");
});
});
</script>
HTML:
<div class="alert alert-danger" id="Success">
<a href="#" class="close" data-dismiss="alert">×</a>
<strong>Error!</strong> There was a problem around your network.
</div>
Run this code combination in browser for the output
Asked In: Many Interviews |
Alert Moderator