ot;); }
>
>
>
> Mitch
>
>
>
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Ganeshji Marwaha
> Sent: Sunday, August 05, 2007 1:54 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Turning a checkbox on and off
>
>
>
>
> How do you check and uncheck a checkbox from jQuery?
This is another item that is in the FAQ:
http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_check.2Funcheck_an_input.3F
--John
e it does, but so does $('your_selector').attr('checked','hi
> > mom');
>
> > And try unselecting it.
>
> > *From:* jquery-en@googlegroups.com
> > [mailto:jquery-en@googlegroups.com]
> > *On Behalf Of *Marshall Salinger
> > *Sen
t;
> Yes that's true it does, but so does $('your_selector').attr('checked','hi
> mom');
>
>
>
> And try unselecting it.
>
>
>
> *From:* jquery-en@googlegroups.com
> [mailto:jquery-en@googlegroups.com]
> *On Behalf Of *Marshall
Mitchell Waite wrote:
Do you know of a good place to learn more about using “:” and all those
other characters listed in the docs?
http://docs.jquery.com/DOM/Traversing/Selectors
http://www.w3.org/TR/2005/WD-css3-selectors-20051215/#pseudo-classes
--Klaus
code did not work.
>
>
>
> Mitch
>
>
>
>
>
> *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Ganeshji Marwaha
> *Sent:* Sunday, August 05, 2007 4:33 PM
> *To:* jquery-en@googlegroups.com
> *Subject:* [jQuery] Re: Tu
ay I apologize for saying your code did not work.
Mitch
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ganeshji Marwaha
Sent: Sunday, August 05, 2007 4:33 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Turning a checkbox on and off
Mitch,
I hav
com] On Behalf Of Marshall
Salinger
Sent: Sunday, August 05, 2007 4:06 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Turning a checkbox on and off
I am not sure I follow.
$('your_selector').attr('checked','checked'); does set a checkbox to
ch
> *Sent:* Sunday, August 05, 2007 4:06 PM
> *To:* jquery-en@googlegroups.com
> *Subject:* [jQuery] Re: Turning a checkbox on and off
>
>
>
> I am not sure I follow. $('your_selector').attr('checked','checked'); does
> set a checkbox to checked.
&
on't work
if( $(checkbox).is(":checked") ) { alert("checked"); }
Mitch
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ganeshji Marwaha
Sent: Sunday, August 05, 2007 1:54 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Turning a chec
ed") ) {
alert("checked"); }
Mitch
From:
jquery-en@googlegroups.com [mailto:jquery-en@googlegroups.com] On
Behalf Of Ganeshji
Marwaha
Sent: Sunday, August 05, 2007 1:54 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Turning a checkbox on and off
ry-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Sean Catchpole
Sent: Sunday, August 05, 2007 2:18 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Turning a checkbox on and off
Mtich,
I like to toggle checkbox states by emulating a click. This allows for any
bound events to also
kbox).attr("checked", "checked");
This also won't work
if( $(checkbox).is(":checked") ) { alert("checked"); }
Mitch
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ganeshji Marwaha
Sent: Sunday, August 05, 2007 1:54 PM
that sounds like a cool idea
-GTG
On 8/5/07, Sean Catchpole <[EMAIL PROTECTED]> wrote:
>
> Mtich,
>
> I like to toggle checkbox states by emulating a click. This allows for any
> bound events to also trigger.
> $(":checkbox").click()
>
> ~Sean
>
Mtich,
I like to toggle checkbox states by emulating a click. This allows for any
bound events to also trigger.
$(":checkbox").click()
~Sean
To determine if a checkbox is checked, i would use if(
$(checkbox).is(":checked") ) { alert("checked"); }
To check a checkbox, $(checkbox).attr("checked", "checked");
Both are untested, but let me know how it goes
-GTG
On 8/5/07, Mitch <[EMAIL PROTECTED]> wrote:
>
>
> How do you check and unch
16 matches
Mail list logo