hi,
how can I use the option :checked with $(this) in jQuery ?
i.e. $(this:checked) ?
thanks
hi,
how can I use the option :checked with $(this) in jQuery ?
i.e. $(this:checked) ?
thanks
$(this).filter(":checked");
or if you're testing it
if ($(this).is(":checked")){
// ...
}
The checkbox Node has its own property checked, so:
if (this.checked) ...
there is no need to make jQuery do a bunch of work by packaging that trivially simple check in a selector. The DOM version is perfectly readable.