[jQuery] Re: Turning a checkbox on and off

2007-08-05 Thread Ganeshji Marwaha
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

[jQuery] Re: Turning a checkbox on and off

2007-08-05 Thread Sean Catchpole
Mtich, I like to toggle checkbox states by emulating a click. This allows for any bound events to also trigger. $(":checkbox").click() ~Sean

[jQuery] Re: Turning a checkbox on and off

2007-08-05 Thread Ganeshji Marwaha
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 >

[jQuery] Re: Turning a checkbox on and off

2007-08-05 Thread Mitchell Waite
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

[jQuery] Re: Turning a checkbox on and off

2007-08-05 Thread Mitchell Waite
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

[jQuery] Re: Turning a checkbox on and off

2007-08-05 Thread Marshall Salinger
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  

[jQuery] Re: Turning a checkbox on and off

2007-08-05 Thread Mitchell Waite
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

[jQuery] Re: Turning a checkbox on and off

2007-08-05 Thread Ganeshji Marwaha
> *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. &

[jQuery] Re: Turning a checkbox on and off

2007-08-05 Thread Marshall Salinger
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

[jQuery] Re: Turning a checkbox on and off

2007-08-05 Thread Mitchell Waite
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

[jQuery] Re: Turning a checkbox on and off

2007-08-05 Thread Ganeshji Marwaha
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

[jQuery] Re: Turning a checkbox on and off

2007-08-05 Thread Klaus Hartl
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

[jQuery] Re: Turning a checkbox on and off

2007-08-06 Thread Erik Beeson
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

[jQuery] Re: Turning a checkbox on and off

2007-08-06 Thread troycawley
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

[jQuery] Re: Turning a checkbox on and off

2007-08-06 Thread John Resig
> 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

[jQuery] Re: Turning a checkbox on and off

2007-08-11 Thread Msemo
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 > > > >