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
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
2 matches
Mail list logo