[jQuery] Re: How do I write an expression to get all checked items of a certain class?

2008-11-19 Thread Satyakaran
good solution. No one has mentioned which one is the best method. I am trying to learn jQuery this way. On Nov 19, 3:33 am, donb [EMAIL PROTECTED] wrote: Oops, overlooked the 'checked' requirement.  The selectors can be 'stacked.'  I just tried this and it works:

[jQuery] Re: How do I write an expression to get all checked items of a certain class?

2008-11-19 Thread ajpiano
that are inputs of type=checkbox, that have class=subscrCheckbox and that are checked? $(:checkbox.subscrCheckbox:checked); is the best way. --adam On Nov 19, 8:16 am, Satyakaran [EMAIL PROTECTED] wrote: good solution. No one has mentioned which one is the best method. I am trying to

[jQuery] Re: How do I write an expression to get all checked items of a certain class?

2008-11-18 Thread Hector Virgen
I think this should work: $('input.subscrCheckbox[type=checkbox][checked]'); -Hector On Tue, Nov 18, 2008 at 1:30 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, How do I write a JQuery expression that will give me all the elements that are inputs of type=checkbox, that have

[jQuery] Re: How do I write an expression to get all checked items of a certain class?

2008-11-18 Thread donb
$(.subscrCheckbox:checkbox) should also work. http://docs.jquery.com/Selectors On Nov 18, 4:36 pm, Hector Virgen [EMAIL PROTECTED] wrote: I think this should work: $('input.subscrCheckbox[type=checkbox][checked]'); -Hector On Tue, Nov 18, 2008 at 1:30 PM, [EMAIL PROTECTED] [EMAIL

[jQuery] Re: How do I write an expression to get all checked items of a certain class?

2008-11-18 Thread Hector Virgen
$(.subscrCheckbox:checkbox) would return all checkboxes with the class name of 'subscrCheckbox', including those that are not checked. $(.subscrCheckbox:checkbox[checked]) is probably the shortest selector you could use that meets your requirements. -Hector On Tue, Nov 18, 2008 at 1:41 PM, donb

[jQuery] Re: How do I write an expression to get all checked items of a certain class?

2008-11-18 Thread c.barr
Also $(.subscrCheckbox).is(:checked); and $ (.subscrCheckbox:checked) should work as well I believe On Nov 18, 3:45 pm, Hector Virgen [EMAIL PROTECTED] wrote: $(.subscrCheckbox:checkbox) would return all checkboxes with the class name of 'subscrCheckbox', including those that are not checked.

[jQuery] Re: How do I write an expression to get all checked items of a certain class?

2008-11-18 Thread Hector Virgen
Nice! I didn't even notice the :checkedhttp://docs.jquery.com/Selectors/checkedselector! :) -Hector On Tue, Nov 18, 2008 at 2:26 PM, c.barr [EMAIL PROTECTED] wrote: Also $(.subscrCheckbox).is(:checked); and $ (.subscrCheckbox:checked) should work as well I believe On Nov 18, 3:45 pm,

[jQuery] Re: How do I write an expression to get all checked items of a certain class?

2008-11-18 Thread donb
Oops, overlooked the 'checked' requirement. The selectors can be 'stacked.' I just tried this and it works: $(.subscrCheckbox:checkbox:checked) inversely: $(:.subscrCheckbox:checkbox:not(:checked)) gets those that aren't On Nov 18, 5:26 pm, c.barr [EMAIL PROTECTED] wrote: Also