<script type="text/javascript"> $(document).ready(function () { $(".close").click(function () { $("#Danger").alert('close'); }); }); </script>
<div id="Danger"> <div class="alert alert-danger"> <a href="#" class="close">×</a> <strong>Error!</strong> There was a problem around your network </div> <div class="alert alert-danger"> <a href="#" class="close">×</a> <strong>Error!</strong> There was a problem building solution. </div> </div>
<script type="text/javascript"> $(document).ready(function () { $("#Success").on('close.bs.alert', function () { alert("This Alert box is being closed."); }); }); </script>
<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>
<div class="well"> <a href="#" class="close" data-dismiss="alert">×</a> <strong>Success!</strong> Your Post was successfully shared. </div>
<span class="glyphicon glyphicon-search"></span>