Write a Script function Alert events from Java script in Bootstraps ?

 Posted by Vivek.Ramapuram on 6/13/2015 | Category: Bootstrap Interview questions | Views: 635 | Points: 40
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">&times;</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 

Comments or Responses

Login to post response