Thanks,
But I think that
if (document.getElementById('test').checked ) {}
would be better...performance wise and readability is better

Is there problem with this approach?

PS: Is there shorter syntaxes for document.getElementById('test')?

Thanks
George.


On Nov 12, 1:25 pm, ripple <[EMAIL PROTECTED]> wrote:
> try:
>  
> if ($("#test").is(":checked")) {}
>  
>  
>
> --- On Wed, 11/12/08, George <[EMAIL PROTECTED]> wrote:
>
> From: George <[EMAIL PROTECTED]>
> Subject: [jQuery] working with checkboxes
> To: "jQuery (English)" <[email protected]>
> Date: Wednesday, November 12, 2008, 1:11 PM
>
> I have a checkbox
> <input type="checkbox" id=test>
>
> the $('#test').checked always returns undefined. No matter if checkbox
> checked or not...
> Is it how it's supposed to be?
>
> I thought that $('#test') will return me the object wrapped so i have
> original methods/properties as well as new one that came from JQuery.
> Am i mistaken?
>
> Thanks
> George.

Reply via email to