<script> $(document).ready(function () { $("#success").on('closed.bs.alert', function () { alert("This is closed"); }); }); </script> </head> <body> <div class="container-fluid"> <h2>TechFunda</h2> <div class="alert alert-success" id="success"> <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> <b>Am TechFunda</b> </div> </div> </body>
container-fluid
and we have the div with class value as alert alert-success
and id as successclose
, data-dismiss=alert
and aria-label as close
#success
.on closed.bs.alert
displays the closed alert function with given value as This is closed output
Views: 5156 | Post Order: 18