diff --git a/javascript.html b/javascript.html index 5188fa7d3e..069e9cbd33 100644 --- a/javascript.html +++ b/javascript.html @@ -228,45 +228,47 @@ $('#myModal').on('show.bs.modal', function (e) {
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-
, as in data-backdrop=""
.
Name | -type | -default | -description | -||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
backdrop | -boolean | -true | -Includes a modal-backdrop element. Alternatively, specify static for a backdrop which doesn't close the modal on click. |
- ||||||||||||||||||||
keyboard | -boolean | -true | -Closes the modal when escape key is pressed | -||||||||||||||||||||
show | -boolean | -true | -Shows the modal when initialized. | -||||||||||||||||||||
remote | -path | -false | -If a remote URL is provided, content will be loaded via jQuery's
+
|
Bootstrap's modal class exposes a few events for hooking into modal functionality.
-Event Type | -Description | -
---|---|
show | -This event fires immediately when the show instance method is called. |
-
shown | -This event is fired when the modal has been made visible to the user (will wait for CSS transitions to complete). | -
hide | -This event is fired immediately when the hide instance method has been called. |
-
hidden | -This event is fired when the modal has finished being hidden from the user (will wait for CSS transitions to complete). | -
Event Type | +Description | +
---|---|
show | +This event fires immediately when the show instance method is called. |
+
shown | +This event is fired when the modal has been made visible to the user (will wait for CSS transitions to complete). | +
hide | +This event is fired immediately when the hide instance method has been called. |
+
hidden | +This event is fired when the modal has finished being hidden from the user (will wait for CSS transitions to complete). | +
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-
, as in data-offset=""
.
Name | -type | -default | -description | -
---|---|---|---|
offset | -number | -10 | -Pixels to offset from top when calculating position of scroll. | -
Name | +type | +default | +description | +
---|---|---|---|
offset | +number | +10 | +Pixels to offset from top when calculating position of scroll. | +
Event Type | -Description | -
---|---|
activate | -This event fires whenever a new item becomes activated by the scrollspy. | -
Event Type | +Description | +
---|---|
activate | +This event fires whenever a new item becomes activated by the scrollspy. | +
Event Type | -Description | -
---|---|
show | -This event fires on tab show, but before the new tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively. |
-
shown | -This event fires on tab show after a tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively. |
-
Event Type | +Description | +
---|---|
show | +This event fires on tab show, but before the new tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively. |
+
shown | +This event fires on tab show after a tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively. |
+
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-
, as in data-animation=""
.
Name | -type | -default | -description | -
---|---|---|---|
animation | -boolean | -true | -apply a CSS fade transition to the tooltip | -
html | -boolean | -false | -Insert HTML into the tooltip. If false, jQuery's text method will be used to insert content into the DOM. Use text if you're worried about XSS attacks. |
-
placement | -string | function | -'top' | -how to position the tooltip - top | bottom | left | right | auto. When "auto" is specified, it will dynamically reorient the tooltip. For example, if placment is "auto left", the tooltip will display to the left when possible, otherwise it will display right. |
-
selector | -string | -false | -If a selector is provided, tooltip objects will be delegated to the specified targets. | -
title | -string | function | -'' | -default title value if title tag isn't present |
-
trigger | -string | -'hover focus' | -how tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space. | -
delay | -number | object | -0 | -
- delay showing and hiding the tooltip (ms) - does not apply to manual trigger type -If a number is supplied, delay is applied to both hide/show -Object structure is: |
-
container | -string | false | -false | -
- Appends the tooltip to a specific element. Example: |
-
Name | +type | +default | +description | +
---|---|---|---|
animation | +boolean | +true | +apply a CSS fade transition to the tooltip | +
html | +boolean | +false | +Insert HTML into the tooltip. If false, jQuery's text method will be used to insert content into the DOM. Use text if you're worried about XSS attacks. |
+
placement | +string | function | +'top' | +how to position the tooltip - top | bottom | left | right | auto. When "auto" is specified, it will dynamically reorient the tooltip. For example, if placment is "auto left", the tooltip will display to the left when possible, otherwise it will display right. |
+
selector | +string | +false | +If a selector is provided, tooltip objects will be delegated to the specified targets. | +
title | +string | function | +'' | +default title value if title tag isn't present |
+
trigger | +string | +'hover focus' | +how tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space. | +
delay | +number | object | +0 | +
+ delay showing and hiding the tooltip (ms) - does not apply to manual trigger type +If a number is supplied, delay is applied to both hide/show +Object structure is: |
+
container | +string | false | +false | +
+ Appends the tooltip to a specific element. Example: |
+
Options for individual tooltips can alternatively be specified through the use of data attributes, as explained above.
@@ -850,32 +862,34 @@ $('#example').tooltip(options) {% highlight js %}$('#element').tooltip('destroy'){% endhighlight %}Event Type | -Description | -
---|---|
show | -This event fires immediately when the show instance method is called. |
-
shown | -This event is fired when the tooltip has been made visible to the user (will wait for CSS transitions to complete). | -
hide | -This event is fired immediately when the hide instance method has been called. |
-
hidden | -This event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete). | -
Event Type | +Description | +
---|---|
show | +This event fires immediately when the show instance method is called. |
+
shown | +This event is fired when the tooltip has been made visible to the user (will wait for CSS transitions to complete). | +
hide | +This event is fired immediately when the hide instance method has been called. |
+
hidden | +This event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete). | +
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-
, as in data-animation=""
.
Name | -type | -default | -description | -
---|---|---|---|
animation | -boolean | -true | -apply a CSS fade transition to the tooltip | -
html | -boolean | -false | -Insert HTML into the popover. If false, jQuery's text method will be used to insert content into the DOM. Use text if you're worried about XSS attacks. |
-
placement | -string | function | -'right' | -how to position the popover - top | bottom | left | right | auto. When "auto" is specified, it will dynamically reorient the popover. For example, if placment is "auto left", the tooltip will display to the left when possible, otherwise it will display right. |
-
selector | -string | -false | -if a selector is provided, tooltip objects will be delegated to the specified targets if a selector is provided, tooltip objects will be delegated to the specified targets. in practice, this is used to enable dynamic HTML content to have popovers added. See this and an informative example. | -
trigger | -string | -'click' | -how popover is triggered - click | hover | focus | manual | -
title | -string | function | -'' | -default title value if title attribute isn't present |
-
content | -string | function | -'' | -default content value if data-content attribute isn't present |
-
delay | -number | object | -0 | -
- delay showing and hiding the popover (ms) - does not apply to manual trigger type -If a number is supplied, delay is applied to both hide/show -Object structure is: |
-
container | -string | false | -false | -
- Appends the popover to a specific element. Example: |
-
Name | +type | +default | +description | +
---|---|---|---|
animation | +boolean | +true | +apply a CSS fade transition to the tooltip | +
html | +boolean | +false | +Insert HTML into the popover. If false, jQuery's text method will be used to insert content into the DOM. Use text if you're worried about XSS attacks. |
+
placement | +string | function | +'right' | +how to position the popover - top | bottom | left | right | auto. When "auto" is specified, it will dynamically reorient the popover. For example, if placment is "auto left", the tooltip will display to the left when possible, otherwise it will display right. |
+
selector | +string | +false | +if a selector is provided, tooltip objects will be delegated to the specified targets if a selector is provided, tooltip objects will be delegated to the specified targets. in practice, this is used to enable dynamic HTML content to have popovers added. See this and an informative example. | +
trigger | +string | +'click' | +how popover is triggered - click | hover | focus | manual | +
title | +string | function | +'' | +default title value if title attribute isn't present |
+
content | +string | function | +'' | +default content value if data-content attribute isn't present |
+
delay | +number | object | +0 | +
+ delay showing and hiding the popover (ms) - does not apply to manual trigger type +If a number is supplied, delay is applied to both hide/show +Object structure is: |
+
container | +string | false | +false | +
+ Appends the popover to a specific element. Example: |
+
Options for individual popovers can alternatively be specified through the use of data attributes, as explained above.
@@ -1070,32 +1086,34 @@ $('#myTooltip').on('hidden.bs.tooltip', function () {Hides and destroys an element's popover.
{% highlight js %}$('#element').popover('destroy'){% endhighlight %}Event Type | -Description | -
---|---|
show | -This event fires immediately when the show instance method is called. |
-
shown | -This event is fired when the popover has been made visible to the user (will wait for CSS transitions to complete). | -
hide | -This event is fired immediately when the hide instance method has been called. |
-
hidden | -This event is fired when the popover has finished being hidden from the user (will wait for CSS transitions to complete). | -
Event Type | +Description | +
---|---|
show | +This event fires immediately when the show instance method is called. |
+
shown | +This event is fired when the popover has been made visible to the user (will wait for CSS transitions to complete). | +
hide | +This event is fired immediately when the hide instance method has been called. |
+
hidden | +This event is fired when the popover has finished being hidden from the user (will wait for CSS transitions to complete). | +
Bootstrap's alert class exposes a few events for hooking into alert functionality.
-Event Type | -Description | -
---|---|
close | -This event fires immediately when the close instance method is called. |
-
closed | -This event is fired when the alert has been closed (will wait for CSS transitions to complete). | -
Event Type | +Description | +
---|---|
close | +This event fires immediately when the close instance method is called. |
+
closed | +This event is fired when the alert has been closed (will wait for CSS transitions to complete). | +
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-
, as in data-parent=""
.
Name | -type | -default | -description | -
---|---|---|---|
parent | -selector | -false | -If selector then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior) | -
toggle | -boolean | -true | -Toggles the collapsible element on invocation | -
Name | +type | +default | +description | +
---|---|---|---|
parent | +selector | +false | +If selector then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior) | +
toggle | +boolean | +true | +Toggles the collapsible element on invocation | +
Bootstrap's collapse class exposes a few events for hooking into collapse functionality.
-Event Type | -Description | -
---|---|
show | -This event fires immediately when the show instance method is called. |
-
shown | -This event is fired when a collapse element has been made visible to the user (will wait for CSS transitions to complete). | -
hide | -
- This event is fired immediately when the hide method has been called.
- |
-
hidden | -This event is fired when a collapse element has been hidden from the user (will wait for CSS transitions to complete). | -
Event Type | +Description | +
---|---|
show | +This event fires immediately when the show instance method is called. |
+
shown | +This event is fired when a collapse element has been made visible to the user (will wait for CSS transitions to complete). | +
hide | +
+ This event is fired immediately when the hide method has been called.
+ |
+
hidden | +This event is fired when a collapse element has been hidden from the user (will wait for CSS transitions to complete). | +
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-
, as in data-interval=""
.
Name | -type | -default | -description | -
---|---|---|---|
interval | -number | -5000 | -The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle. | -
pause | -string | -"hover" | -Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave. | -
Name | +type | +default | +description | +
---|---|---|---|
interval | +number | +5000 | +The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle. | +
pause | +string | +"hover" | +Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave. | +
Bootstrap's carousel class exposes two events for hooking into carousel functionality.
-Event Type | -Description | -
---|---|
slide | -This event fires immediately when the slide instance method is invoked. |
-
slid | -This event is fired when the carousel has completed its slide transition. | -
Event Type | +Description | +
---|---|
slide | +This event fires immediately when the slide instance method is invoked. |
+
slid | +This event is fired when the carousel has completed its slide transition. | +
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-
, as in data-offset-top="200"
.
Name | -type | -default | -description | -
---|---|---|---|
offset | -number | function | object | -10 | -Pixels to offset from screen when calculating position of scroll. If a single number is provided, the offset will be applied in both top and left directions. To provide a unique, bottom and top offset just provide an object offset: { top: 10 } or offset: { top: 10, bottom: 5 } . Use a function when you need to dynamically calculate an offset. |
-
Name | +type | +default | +description | +
---|---|---|---|
offset | +number | function | object | +10 | +Pixels to offset from screen when calculating position of scroll. If a single number is provided, the offset will be applied in both top and left directions. To provide a unique, bottom and top offset just provide an object offset: { top: 10 } or offset: { top: 10, bottom: 5 } . Use a function when you need to dynamically calculate an offset. |
+