I have this code
var $ele = $("input[type=\'checkbox\']"); var $btn = $(this); var $sameCheck = $btn.attr(\'id\') && $ele.is(\':checked\