mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Move inline JS to application.js.
This commit is contained in:
parent
9be99c9b34
commit
e4dc6b84b1
2 changed files with 10 additions and 7 deletions
|
@ -14,13 +14,6 @@ Structurally, our `<input>`s and `<label>`s are sibling elements as opposed to a
|
|||
|
||||
Our checks use custom Bootstrap icons to indicate checked or indeterminate states.
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
var checkbox = document.getElementById("flexCheckIndeterminate");
|
||||
checkbox.indeterminate = true;
|
||||
});
|
||||
</script>
|
||||
|
||||
## Checks
|
||||
|
||||
{{< example >}}
|
||||
|
|
|
@ -19,6 +19,16 @@
|
|||
return [].slice.call(list)
|
||||
}
|
||||
|
||||
(function () {
|
||||
var checkbox = document.getElementById('flexCheckIndeterminate')
|
||||
|
||||
if (!checkbox) {
|
||||
return
|
||||
}
|
||||
|
||||
checkbox.indeterminate = true
|
||||
})()
|
||||
|
||||
makeArray(document.querySelectorAll('.js-sidenav-group'))
|
||||
.forEach(function (sidenavGroup) {
|
||||
var groupHasLinks = Boolean(sidenavGroup.querySelector('li'))
|
||||
|
|
Loading…
Reference in a new issue