impress/app/assets/javascripts/closet_hangers/petpage.js

8 lines
209 B
JavaScript

(function () {
function setChecked() {
var el = $(this);
el.closest('li').toggleClass('checked', el.is(':checked'));
}
$('#petpage-closet-lists input').click(setChecked).each(setChecked);
})();