I'm trying to do something trivial and running into a problem. When retrieving the checked attribute of a checkbox, I'm getting undefined and I can't figure out why. What am I doing wrong?
console.log($("#invert").attr("checked"));
<input type="checkbox" id="invert"/> Invert Image