]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Indicate proper way to check for switch value.
authorjellisii <jellisii@gmail.com>
Mon, 13 Feb 2017 14:38:22 +0000 (09:38 -0500)
committerGitHub <noreply@github.com>
Mon, 13 Feb 2017 14:38:22 +0000 (09:38 -0500)
There have been tickets in the past that indicated that checking the value of the underlying input for a switch is not obvious.  Added documentation to clarify said check.

docs/pages/switch.md

index 1abd4ed31ab133202ba76c310ed26fc682be99ed..50e64de463d01a1705a04ea4122bc43643f7c261 100644 (file)
@@ -18,6 +18,9 @@ Give the `<input>` a unique ID and point the `<label>` to it with the `for` attr
   <p>Make sure the HTML of the switch goes in the order you see above&mdash;<code>&lt;input&gt;</code>, then <code>&lt;label&gt;</code></p>
 </div>
 
+<div class='primary callout'>
+  <p>Inspecting the value of the underlying input should be done by evaluating the <code>checked</code> property of said input.</p>
+</div>
 ```html_example
 <div class="switch">
   <input class="switch-input" id="exampleSwitch" type="checkbox" name="exampleSwitch">