Created
May 17, 2011 14:09
-
-
Save corydorning/976527 to your computer and use it in GitHub Desktop.
Uncheck checkboxes using jQuery
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
/* | |
* jQuery - Uncheck Checkboxes - 05/17/2011 | |
* http://corydorning.com | |
* | |
* Dual licensed under 'Use it like you stole it' | |
* and 'I Don't Care'. | |
* | |
* Description: Uncheck any checkeboxes that might | |
* be checked. Simple, yet effective, particularly | |
* for how I needed to use it with AJAX. | |
* | |
* Example usage: | |
* clearCheckboxes($(':checkbox')); | |
* | |
*/ | |
function clearCheckboxes($sel) { | |
$sel.each(function() { | |
this.checked = false; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment