Answer: In Bootstraps if you want to close all the alert messages at once.
Here is the example :
We should write Java script code and HTML 5 code.
Javascript:
<script type="text/javascript">
$(document).ready(function ()
{
$(".close").click(function ()
{
$("#Danger").alert('close');
});
});
</script>
HTML :
<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>
Run the code combination in the browser for out put
Asked In: Many Interviews |
Alert Moderator