[jQuery] Re: how to access "checked" attribute on a toggle

2009-02-04 Thread Karl Rudd
The "name" attribute isn't the same as the "id" attribute (though in IE it "kind of" is). On a side note, XHTML and HTML differ in how you make something "checked": HTML: XHTML: If you want to select by "name" you'll need to do this: $("input[name=tog_0]") Or you could add an "id" to

[jQuery] Re: how to access "checked" attribute on a toggle

2009-02-04 Thread James
alert( $("#tog_0:checked").val() ); It will return whatever value is set for that input. On Feb 4, 3:02 pm, Chris wrote: > This is incredibly basic, but I'm missing something. I have this html: > > > > I want to find the toggle and get the value of checked. I have tried > the following, but not