On Tue, Jan 18, 2011 at 11:23 AM, Mathias Schäfer <[email protected]>wrote:
> 2011/1/18 Diego Perini <[email protected]>: > >> $('#my-check-box').attr('checked', true); -> should work cross browser > if > >> it is a checkbox. > >> > >> and you can check if a checkbox is checked by using > >> `$('#my-check-box').is(':checked')`... > If you know the result will have an element you might as well do $('#my-check-box')[0].checked Because the dom elements in a jquery query are accessible by index. I wonder if anyone has a problem with that... - peter -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
