mirror of
https://github.com/twbs/bootstrap.git
synced 2025-03-02 02:29:24 +01:00
remove some jquery references in collapse docs
This commit is contained in:
parent
99b2a80db8
commit
fd8a651521
@ -150,7 +150,10 @@ To add accordion-like group management to a collapsible area, add the data attri
|
|||||||
Enable manually with:
|
Enable manually with:
|
||||||
|
|
||||||
{{< highlight js >}}
|
{{< highlight js >}}
|
||||||
$('.collapse').collapse()
|
var collapseElementList = [].slice.call(document.querySelectorAll('.collapse'))
|
||||||
|
var collapseList = collapseElementList.map(function (collapseEl) {
|
||||||
|
return new bootstrap.Collapse(collapseEl)
|
||||||
|
})
|
||||||
{{< /highlight >}}
|
{{< /highlight >}}
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
@ -205,6 +208,7 @@ var bsCollapse = new bootstrap.Collapse(myCollapse, {
|
|||||||
| `show` | Shows a collapsible element. **Returns to the caller before the collapsible element has actually been shown** (i.e. before the `shown.bs.collapse` event occurs).|
|
| `show` | Shows a collapsible element. **Returns to the caller before the collapsible element has actually been shown** (i.e. before the `shown.bs.collapse` event occurs).|
|
||||||
| `hide` | 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).|
|
| `hide` | 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).|
|
||||||
| `dispose` | Destroys an element's collapse. |
|
| `dispose` | Destroys an element's collapse. |
|
||||||
|
| `_getInstance` | *Static* method which allows you to get the collapse instance associated with a DOM element |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
@ -238,7 +242,8 @@ Bootstrap's collapse class exposes a few events for hooking into collapse functi
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
{{< highlight js >}}
|
{{< highlight js >}}
|
||||||
$('#myCollapsible').on('hidden.bs.collapse', function () {
|
var myCollapsible = document.getElementById('myCollapsible')
|
||||||
|
myCollapsible.addEventListener('hidden.bs.collapse', function () {
|
||||||
// do something...
|
// do something...
|
||||||
})
|
})
|
||||||
{{< /highlight >}}
|
{{< /highlight >}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user