aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJohann-S <[email protected]>2017-10-16 16:51:42 +0200
committerGitHub <[email protected]>2017-10-16 16:51:42 +0200
commit99eece13929cf69515927a04a176cc3e578c4194 (patch)
treee89ec9e642e340c7a2d11865be24b505dd66621f /docs
parent658e81a0840a2b49e7977206e3d5feabea797677 (diff)
downloadbootstrap-99eece13929cf69515927a04a176cc3e578c4194.tar.xz
bootstrap-99eece13929cf69515927a04a176cc3e578c4194.zip
Add dispose methods in our documentation (#24396)
* Add dispose methods in our documentation * Update buttons.md
Diffstat (limited to 'docs')
-rw-r--r--docs/4.0/components/alerts.md1
-rw-r--r--docs/4.0/components/buttons.md3
-rw-r--r--docs/4.0/components/carousel.md4
-rw-r--r--docs/4.0/components/collapse.md4
-rw-r--r--docs/4.0/components/dropdowns.md1
-rw-r--r--docs/4.0/components/modal.md4
-rw-r--r--docs/4.0/components/navs.md4
-rw-r--r--docs/4.0/components/scrollspy.md3
8 files changed, 23 insertions, 1 deletions
diff --git a/docs/4.0/components/alerts.md b/docs/4.0/components/alerts.md
index b8bb0c216..4fdaed41b 100644
--- a/docs/4.0/components/alerts.md
+++ b/docs/4.0/components/alerts.md
@@ -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 %}
diff --git a/docs/4.0/components/buttons.md b/docs/4.0/components/buttons.md
index fac603e7e..41ca9cef0 100644
--- a/docs/4.0/components/buttons.md
+++ b/docs/4.0/components/buttons.md
@@ -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. |
diff --git a/docs/4.0/components/carousel.md b/docs/4.0/components/carousel.md
index 4919e1ac2..ac6299f6f 100644
--- a/docs/4.0/components/carousel.md
+++ b/docs/4.0/components/carousel.md
@@ -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:
diff --git a/docs/4.0/components/collapse.md b/docs/4.0/components/collapse.md
index a34ffeb7b..cd0a7d4e5 100644
--- a/docs/4.0/components/collapse.md
+++ b/docs/4.0/components/collapse.md
@@ -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.
diff --git a/docs/4.0/components/dropdowns.md b/docs/4.0/components/dropdowns.md
index d38b410c7..2c467166e 100644
--- a/docs/4.0/components/dropdowns.md
+++ b/docs/4.0/components/dropdowns.md
@@ -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
diff --git a/docs/4.0/components/modal.md b/docs/4.0/components/modal.md
index 491bd3fb8..3586f461c 100644
--- a/docs/4.0/components/modal.md
+++ b/docs/4.0/components/modal.md
@@ -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">`).
diff --git a/docs/4.0/components/navs.md b/docs/4.0/components/navs.md
index b34f79c2f..27230e039 100644
--- a/docs/4.0/components/navs.md
+++ b/docs/4.0/components/navs.md
@@ -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:
diff --git a/docs/4.0/components/scrollspy.md b/docs/4.0/components/scrollspy.md
index b7f9e994f..7cc6873f3 100644
--- a/docs/4.0/components/scrollspy.md
+++ b/docs/4.0/components/scrollspy.md
@@ -280,6 +280,9 @@ $('[data-spy="scroll"]').each(function () {
})
{% endhighlight %}
+### `.scrollspy('dispose')`
+
+Destroys an element's scrollspy.
### Options