Commit e4dc6b84 authored by XhmikosR's avatar XhmikosR
Browse files

Move inline JS to application.js.

parent 9be99c9b
Showing with 10 additions and 7 deletions
+10 -7
......@@ -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'))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment