]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Add dispose methods in our documentation (#24396)
authorJohann-S <johann.servoire@gmail.com>
Mon, 16 Oct 2017 14:51:42 +0000 (16:51 +0200)
committerGitHub <noreply@github.com>
Mon, 16 Oct 2017 14:51:42 +0000 (16:51 +0200)
* Add dispose methods in our documentation

* Update buttons.md

docs/4.0/components/alerts.md
docs/4.0/components/buttons.md
docs/4.0/components/carousel.md
docs/4.0/components/collapse.md
docs/4.0/components/dropdowns.md
docs/4.0/components/modal.md
docs/4.0/components/navs.md
docs/4.0/components/scrollspy.md

index b8bb0c2168ef3f854de1a2de0c23a075caa2ad31..4fdaed41b26a42a01b9df419bd2a298111ee3fe4 100644 (file)
@@ -92,6 +92,7 @@ Note that closing an alert will remove it from the DOM.
 | --- | --- |
 | `$().alert()` | 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')` | Closes an alert by removing it from the DOM. If the `.fade` and `.show` classes are present on the element, the alert will fade out before it is removed. |
+| `$().alert('dispose')` | Destroys an element's alert. |
 
 {% highlight js %}$(".alert").alert('close'){% endhighlight %}
 
index fac603e7e1228195fb2d4ff03944a65a145ad85b..41ca9cef075a87dca1d199eda98934e27742fbbb 100644 (file)
@@ -154,4 +154,5 @@ Note that pre-checked buttons require you to manually add the `.active` class to
 
 | Method | Description |
 | --- | --- |
-| `$().button('toggle')` |Toggles push state. Gives the button the appearance that it has been activated.  |
+| `$().button('toggle')` | Toggles push state. Gives the button the appearance that it has been activated. |
+| `$().button('dispose')` | Destroys an element's button. |
index 4919e1ac28ea2f24ba3a7bc3b8bcbf5d9dfaac8c..ac6299f6f88555285145a904d73ca929da244a46 100644 (file)
@@ -263,6 +263,10 @@ Cycles to the previous item. **Returns to the caller before the previous item ha
 
 Cycles to the next item. **Returns to the caller before the next item has been shown** (i.e. before the `slid.bs.carousel` event occurs).
 
+### `.carousel('dispose')`
+
+Destroys an element's carousel.
+
 ### Events
 
 Bootstrap's carousel class exposes two events for hooking into carousel functionality. Both events have the following additional properties:
index a34ffeb7ba287d3508a0af450723683ccef2a67f..cd0a7d4e5f56f31ae8e16c8bdc615273b31bf3a7 100644 (file)
@@ -226,6 +226,10 @@ Shows a collapsible element. **Returns to the caller before the collapsible elem
 
 Hides a collapsible element. **Returns to the caller before the collapsible element has actually been hidden** (i.e. before the `hidden.bs.collapse` event occurs).
 
+### `.collapse('dispose')`
+
+Destroys an element's collapse.
+
 ### Events
 
 Bootstrap's collapse class exposes a few events for hooking into collapse functionality.
index d38b410c78b5f4d09683c45b5ca07e58c485c165..2c467166e530ed9d03511eacf96abbd411d617ad 100644 (file)
@@ -607,6 +607,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
 | --- | --- |
 | `$().dropdown('toggle')` | Toggles the dropdown menu of a given navbar or tabbed navigation. |
 | `$().dropdown('update')` | Updates the position of an element's dropdown. |
+| `$().dropdown('dispose')` | Destroys an element's dropdown. |
 
 ### Events
 
index 491bd3fb8f7a8cc0a5ed2105874e3eed53aed605..3586f461ca6f6705f8b57e402e5c8d4cef3a4831 100644 (file)
@@ -575,6 +575,10 @@ Manually readjust the modal's position if the height of a modal changes while it
 
 {% highlight js %}$('#myModal').modal('handleUpdate'){% endhighlight %}
 
+### `.modal('dispose')`
+
+Destroys an element's modal.
+
 ### Events
 
 Bootstrap's modal class exposes a few events for hooking into modal functionality. All modal events are fired at the modal itself (i.e. at the `<div class="modal">`).
index b34f79c2f9f28179e79aff2e35c120f752c75b8e..27230e03969e5a4a19a182a94ec79b2e3461bc38 100644 (file)
@@ -583,6 +583,10 @@ Selects the given tab and shows its associated pane. Any other tab that was prev
 $('#someTab').tab('show')
 {% endhighlight %}
 
+### .tab('dispose')
+
+Destroys an element's tab.
+
 ### Events
 
 When showing a new tab, the events fire in the following order:
index b7f9e994fd571d58542cc11dee950baec81e5935..7cc6873f304c2ba0c6260a9213a8cd24688dd25e 100644 (file)
@@ -280,6 +280,9 @@ $('[data-spy="scroll"]').each(function () {
 })
 {% endhighlight %}
 
+### `.scrollspy('dispose')`
+
+Destroys an element's scrollspy.
 
 ### Options