[jQuery] Checked input box
I can check a chekckbox input Something that it input type=checkbox id=mycheck $(#mycheck).checked(); and return true or false Thk. Giro. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Checked input box
$('#mycheck').attr(checked) On 9/6/06, David Gironella [EMAIL PROTECTED] wrote: I can check a chekckbox input Something that it input type=checkbox id=mycheck $('#mycheck').checked(); and return true or false ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Checked input box
This always return to me null, if checkbox is checked or not. Try this: $('#mycheck')[0].checked ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Checked input box
You're right, but it should work. Anyone else? js: $(#bar).click(function() { var checked = $(#foo).attr(checked); $(#foo).attr(checked, !checked); }); html: input id=foo type=checkbox value=OK / input id=bar type=button value=Test / result: first click of the button sets the checkbox to checked, next clicks it remains checked. On 9/6/06, David Gironella [EMAIL PROTECTED] wrote: This always return to me null, if checkbox is checked or not. Giro. -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Dylan Verheul Enviado el: miércoles, 06 de septiembre de 2006 14:42 Para: jQuery Discussion. Asunto: Re: [jQuery] Checked input box $('#mycheck').attr(checked) On 9/6/06, David Gironella [EMAIL PROTECTED] wrote: I can check a chekckbox input Something that it input type=checkbox id=mycheck $('#mycheck').checked(); and return true or false ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Checked input box
try $('#mycheck')[0].checked checked is one of those attributes that won't work well with getAttribute and setAttribute cross browser. -- Klaus David Gironella schrieb: This always return to me null, if checkbox is checked or not. Giro. -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Dylan Verheul Enviado el: miércoles, 06 de septiembre de 2006 14:42 Para: jQuery Discussion. Asunto: Re: [jQuery] Checked input box $('#mycheck').attr(checked) On 9/6/06, David Gironella [EMAIL PROTECTED] wrote: I can check a chekckbox input Something that it input type=checkbox id=mycheck $('#mycheck').checked(); and return true or false ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Checked input box
Yes, this work. Thk. Giro. -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Mike Alsup Enviado el: miércoles, 06 de septiembre de 2006 15:39 Para: jQuery Discussion. Asunto: Re: [jQuery] Checked input box This always return to me null, if checkbox is checked or not. Try this: $('#mycheck')[0].checked ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/