To give an alert close functionality, all we need is to add data-dismiss="alert"
to our close button.
<div class="alert alert-info alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
Sphinx of black quartz, judge my vow
</div>
.alert-dismissible
and .close
classes are optional, only useful for styling.