From d52ad3ee3ba5a0fc51e1f06abeebd888846856eb Mon Sep 17 00:00:00 2001 From: Julian Thilo Date: Mon, 17 Mar 2014 15:58:03 +0100 Subject: Separate JS includes for alerts and popovers /cc @mdo --- docs/_includes/js/alerts.html | 71 ++++++++++++++++++++++++++++++++++++++ docs/_includes/js/popovers.html | 76 ----------------------------------------- 2 files changed, 71 insertions(+), 76 deletions(-) create mode 100644 docs/_includes/js/alerts.html (limited to 'docs/_includes/js') diff --git a/docs/_includes/js/alerts.html b/docs/_includes/js/alerts.html new file mode 100644 index 000000000..04bbd43cf --- /dev/null +++ b/docs/_includes/js/alerts.html @@ -0,0 +1,71 @@ +
+

Alert messages alert.js

+ +

Example alerts

+

Add dismiss functionality to all alert messages with this plugin.

+
+ +
+ +
+ +
+ + +

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 %} + +

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.

+ +

.alert('close')

+

Closes an alert.

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

Events

+

Bootstrap's alert class exposes a few events for hooking into alert functionality.

+
+ + + + + + + + + + + + + + + + + +
Event TypeDescription
close.bs.alertThis event fires immediately when the close instance method is called.
closed.bs.alertThis event is fired when the alert has been closed (will wait for CSS transitions to complete).
+
+{% highlight js %} +$('#my-alert').bind('closed.bs.alert', function () { + // do something… +}) +{% endhighlight %} +
diff --git a/docs/_includes/js/popovers.html b/docs/_includes/js/popovers.html index 7bf515ad4..56e3600aa 100644 --- a/docs/_includes/js/popovers.html +++ b/docs/_includes/js/popovers.html @@ -263,79 +263,3 @@ $('#myPopover').on('hidden.bs.popover', function () { }) {% endhighlight %} - - - - -
-

Alert messages alert.js

- -

Example alerts

-

Add dismiss functionality to all alert messages with this plugin.

-
- -
- -
- -
- - -

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 %} - -

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.

- -

.alert('close')

-

Closes an alert.

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

Events

-

Bootstrap's alert class exposes a few events for hooking into alert functionality.

-
- - - - - - - - - - - - - - - - - -
Event TypeDescription
close.bs.alertThis event fires immediately when the close instance method is called.
closed.bs.alertThis event is fired when the alert has been closed (will wait for CSS transitions to complete).
-
-{% highlight js %} -$('#my-alert').bind('closed.bs.alert', function () { - // do something… -}) -{% endhighlight %} -
-- cgit v1.2.3 From 8534e12523c7156b53e76393cc8d016ffdcf5b4f Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Mon, 20 Jan 2014 11:54:22 -0800 Subject: Add tooltip `viewport` option, respect bounds of the viewport --- docs/_includes/js/tooltips.html | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs/_includes/js') diff --git a/docs/_includes/js/tooltips.html b/docs/_includes/js/tooltips.html index 2656556be..b952e8504 100644 --- a/docs/_includes/js/tooltips.html +++ b/docs/_includes/js/tooltips.html @@ -134,6 +134,14 @@ $('#example').tooltip(options)

Appends the tooltip to a specific element. Example: container: 'body'

+ + viewport + string | object + { selector: 'body', padding: 0 } + +

Keeps the tooltip within the bounds of this element. Example: viewport: '#viewport' or { selector: '#viewport', padding: 0 }

+ + -- cgit v1.2.3