aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--site/content/docs/4.3/forms/checks.md7
-rw-r--r--site/static/docs/4.3/assets/js/src/application.js10
2 files changed, 10 insertions, 7 deletions
diff --git a/site/content/docs/4.3/forms/checks.md b/site/content/docs/4.3/forms/checks.md
index 5c1110858..34369b80f 100644
--- a/site/content/docs/4.3/forms/checks.md
+++ b/site/content/docs/4.3/forms/checks.md
@@ -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 >}}
diff --git a/site/static/docs/4.3/assets/js/src/application.js b/site/static/docs/4.3/assets/js/src/application.js
index 60680aa72..9f7abe8b5 100644
--- a/site/static/docs/4.3/assets/js/src/application.js
+++ b/site/static/docs/4.3/assets/js/src/application.js
@@ -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'))