Created
March 4, 2011 10:32
-
-
Save larssg/854433 to your computer and use it in GitHub Desktop.
Check all checkboxes containing a specific string in the id.
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
$('input[type=checkbox]').each(function() { var b = $(this); if(b.attr('id').indexOf('edit-facts') > -1) { b.attr('checked','checked') } }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment