I\'ve been trying to figure out how to add the attribute \"checked\" to a checkbox on click. The reason I want to do this is so if I check off a checkbox; I can have my loca
If .attr() isn't working for you (especially when checking and unchecking boxes in succession), use .prop() instead of .attr().
.attr()
.prop()