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
| //Add/remove a class to labels with checkboxes and radio buttons and style them | |
| $('label input[type=radio], label input[type=checkbox]').click(function() { | |
| $('label:has(input:checked)').addClass('active'); | |
| $('label:has(input:not(:checked))').removeClass('active'); | |
| }); |