2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-14 18:42:30 +03:00

docs: switch to fenced codeblocks (#31806)

This commit is contained in:
XhmikosR
2020-10-19 12:56:49 +03:00
committed by GitHub
parent 48177c946f
commit e6618a6ebb
43 changed files with 494 additions and 446 deletions
+6 -6
View File
@@ -149,12 +149,12 @@ To add accordion-like group management to a collapsible area, add the data attri
Enable manually with:
{{< highlight js >}}
```js
var collapseElementList = [].slice.call(document.querySelectorAll('.collapse'))
var collapseList = collapseElementList.map(function (collapseEl) {
return new bootstrap.Collapse(collapseEl)
})
{{< /highlight >}}
```
### Options
@@ -195,12 +195,12 @@ Activates your content as a collapsible element. Accepts an optional options `ob
You can create a collapse instance with the constructor, for example:
{{< highlight js >}}
```js
var myCollapse = document.getElementById('myCollapse')
var bsCollapse = new bootstrap.Collapse(myCollapse, {
toggle: false
})
{{< /highlight >}}
```
<table class="table">
<thead>
@@ -264,9 +264,9 @@ Bootstrap's collapse class exposes a few events for hooking into collapse functi
</tbody>
</table>
{{< highlight js >}}
```js
var myCollapsible = document.getElementById('myCollapsible')
myCollapsible.addEventListener('hidden.bs.collapse', function () {
// do something...
})
{{< /highlight >}}
```