From: fat Date: Sat, 27 Jul 2013 03:50:51 +0000 (-0700) Subject: Merge branch '3.0.0-docs-js' of git://github.com/juthilo/bootstrap-wip into juthilo... X-Git-Tag: v3.0.0-rc1~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93eeb8578d3d5d2629f27316af71395817b23bdd;p=thirdparty%2Fbootstrap.git Merge branch '3.0.0-docs-js' of git://github.com/juthilo/bootstrap-wip into juthilo-3.0.0-docs-js Conflicts: javascript.html --- 93eeb8578d3d5d2629f27316af71395817b23bdd diff --cc javascript.html index 213f32778a,5d94d3f2d5..623421c2d5 --- a/javascript.html +++ b/javascript.html @@@ -836,287 -847,351 +836,348 @@@ $('#example').tooltip(options Hover over me {% endhighlight %} -

Methods

- -

$().tooltip(options)

-

Attaches a tooltip handler to an element collection.

- -

.tooltip('show')

-

Reveals an element's tooltip.

- {% highlight js %}$('#element').tooltip('show'){% endhighlight %} - -

.tooltip('hide')

-

Hides an element's tooltip.

- {% highlight js %}$('#element').tooltip('hide'){% endhighlight %} - -

.tooltip('toggle')

-

Toggles an element's tooltip.

- {% highlight js %}$('#element').tooltip('toggle'){% endhighlight %} - -

.tooltip('destroy')

-

Hides and destroys an element's tooltip.

- {% highlight js %}$('#element').tooltip('destroy'){% endhighlight %} - -

Events

- - - - - - - - - - - - - - - - - - - - - - - - - -
Event TypeDescription
showThis event fires immediately when the show instance method is called.
shownThis event is fired when the tooltip has been made visible to the user (will wait for CSS transitions to complete).
hideThis event is fired immediately when the hide instance method has been called.
hiddenThis event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete).
+

Methods

+ +

$().tooltip(options)

+

Attaches a tooltip handler to an element collection.

+ +

.tooltip('show')

+

Reveals an element's tooltip.

+ {% highlight js %}$('#element').tooltip('show'){% endhighlight %} + +

.tooltip('hide')

+

Hides an element's tooltip.

+ {% highlight js %}$('#element').tooltip('hide'){% endhighlight %} + +

.tooltip('toggle')

+

Toggles an element's tooltip.

+ {% highlight js %}$('#element').tooltip('toggle'){% endhighlight %} + +

.tooltip('destroy')

+

Hides and destroys an element's tooltip.

+ {% highlight js %}$('#element').tooltip('destroy'){% endhighlight %} - - + ++

Events

++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
Event TypeDescription
showThis event fires immediately when the show instance method is called.
shownThis event is fired when the tooltip has been made visible to the user (will wait for CSS transitions to complete).
hideThis event is fired immediately when the hide instance method has been called.
hiddenThis event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete).
+ {% highlight js %} + $('#myTooltip').on('hidden.bs.tooltip', function () { - // do something… ++// do something… + }) + {% endhighlight %} - ++ + +
+ +

Examples

+

Add small overlays of content, like those on the iPad, to any element for housing secondary information. Hover over the button to trigger the popover.

- -
-
+
- - + +
+ - -
- +

Example alerts

+

Add dismiss functionality to all alert messages with this plugin.

+
+
+ + Holy guacamole! Best check yo self, you're not looking too good. +
+
+
+
+ +

Oh snap! You got an error!

+

Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.

+

+ Take this action Or do this +

+
+
-

Example alerts

-

Add dismiss functionality to all alert messages with this plugin.

-
-
- - Holy guacamole! Best check yo self, you're not looking too good. -
-
- -
-
- -

Oh snap! You got an error!

-

Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.

-

- Take this action Or do this -

-
-
- - -
- - -

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
closeThis event fires immediately when the close instance method is called.
closedThis event is fired when the alert has been closed (will wait for CSS transitions to complete).
+ +

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
closeThis event fires immediately when the close instance method is called.
closedThis 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…