Tuesday 15 September 2015

Why is jquery returning undefined for checkbox "checked" attribute? -


I'm trying to run in something trivial and in a problem. When retrieving a checked attribute of a checkbox, I'm getting undefined and I do not know why am I doing?

  console.log ($ ("# invert") etter ("check"); & Lt; Input type = "checkbox" id = "inverted" />     

outlined in the image because is not checked in the element of the question attribute is a checked property though:

  console.log ($ ("($ (" # invert "). Prop (" check "); // is true or false   

this is the one.

No comments:

Post a Comment