diff --git a/docs/_includes/js/alerts.html b/docs/_includes/js/alerts.html index e9cb8c871b..5b7f4e10c3 100644 --- a/docs/_includes/js/alerts.html +++ b/docs/_includes/js/alerts.html @@ -24,21 +24,25 @@

Usage

-

Enable dismissal of an alert via JavaScript:

- {% highlight js %}$(".alert").alert(){% endhighlight %} -

Markup

Just add data-dismiss="alert" to your close button to automatically give an alert close functionality.

- {% highlight html %}{% endhighlight %} + +{% highlight html %} + +{% endhighlight %} + +

To have your alerts use animation when closing, make sure they have the .fade and .in class already applied to them.

Methods

$().alert()

-

Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the .fade and .in class already applied to them.

+

Makes an alert listen for click events on descendant elements which have the data-dismiss="alert" attribute. (Not necessary when using the data-api's auto-initialization.)

-

.alert('close')

+

$().alert('close')

Closes an alert.

- {% highlight js %}$(".alert").alert('close'){% endhighlight %}

Events

@@ -64,7 +68,7 @@ {% highlight js %} -$('#my-alert').on('closed.bs.alert', function () { +$('#myAlert').on('closed.bs.alert', function () { // do something… }) {% endhighlight %}