0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

Move inline JS to application.js.

This commit is contained in:
XhmikosR 2019-07-17 11:29:30 +03:00
parent 9be99c9b34
commit e4dc6b84b1
2 changed files with 10 additions and 7 deletions

View File

@ -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 >}}

View File

@ -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'))