Created
June 3, 2015 12:53
-
-
Save mantaskaveckas/d36c11f95c143754892d to your computer and use it in GitHub Desktop.
Custom HTML checkbox toggle
This file contains 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
$('label').on('click', function() { | |
$(this).siblings('input').attr('checked', function(index, attr) { | |
return attr == 'checked' ? null : 'checked'; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment