twitter-bootstrap Alert Dismissible Alerts


Example

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">&times;</span>
    </button>
    Sphinx of black quartz, judge my vow
</div>

enter image description here

.alert-dismissible and .close classes are optional, only useful for styling.