Last active
December 14, 2015 01:38
-
-
Save mason-stewart/5007233 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Needs an extra closure (not shown) | |
| mode = {a: 'foo', b:'bar', c:'baz'} | |
| for (var key in mode) { | |
| $('#' + key).change(function() { | |
| if ($(this).is(':checked')) { | |
| mode[key] = true; | |
| } | |
| else { | |
| mode[key] = false; | |
| } | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment