SyntaxFix
Write A Post
Hire A Developer
Questions
To do it with .attr() like you have, to see if it's checked it would be .attr("checked", "checked"), and if it isn't it would be .attr("checked") == undefined
.attr()
.attr("checked", "checked")
.attr("checked") == undefined