I have this line of code for page load:
if ($(\"input\").is(\':checked\')) {
and it works fine when the radio button input is checked. How
This works too. It seems shortest working notation:
!$('#selector:checked')
If my firebug profiler work fine (and i know how to use it well), this:
$('#communitymode').attr('checked')
is faster than
$('#communitymode').is('checked')
You can try on this page :)
And then you can use it like
if($('#communitymode').attr('checked')===true) {
// do something
}
$('input:radio[checked=false]');
this will also work
input:radio:not(:checked)
or
:radio:not(:checked)
$("input").is(":not(':checked')"))
This is jquery 1.3, mind the ' and " signs!
(!$('#radio').is(':checked'))
This worked for me
if ( ! $("input").is(':checked') )
Doesn't work?
You might also try iterating over the elements like so:
var iz_checked = true;
$('input').each(function(){
iz_checked = iz_checked && $(this).is(':checked');
});
if ( ! iz_checked )