If I wanted to select all the checkboxes that were selected, I could do it.
$('#mydiv input[type=checkbox]:checked')
Is there a similar simple syntax that allows me to select all the checkboxes that are NOT selected?
Hiya yep: demo http://jsfiddle.net/usvrb/
http://api.jquery.com/not-selector/
quote
The .not() method will end up providing you with more readable selections than pushing complex selectors or variables into a :not() selector filter. In most cases, this is the best choice.
The .not() method will end up providing you with more readable selections than pushing complex selectors or variables into a :not()
selector filter. In most cases, this is the best choice.
Hope this helps :) cheers!
$('#mydiv input[type=checkbox]:not(:checked)')
You will not believe.
$('#mydiv input[type=checkbox]').not(':checked')
EDIT : Stackoverflow management, what happens to CAPTCHA nuts? Today, every answer requires me to enter the CAPTCHA code?