alert( $("#tog_0:checked").val() ); It will return whatever value is set for that input.
On Feb 4, 3:02 pm, Chris <chris.b...@gmail.com> wrote: > This is incredibly basic, but I'm missing something. I have this html: > > <input class="show_tog" type="checkbox" checked="" name="tog_0"/> > > I want to find the toggle and get the value of checked. I have tried > the following, but nothing works: > > alert ($("#tog_0").attr("checked")); > alert ($("#tog_0").checked); > > both give me undefined. > > $("#tog_0") is giving me an object. > > What am I missing? > > -- > Chris