orbit-basic/app/assets/javascripts/inc/permission-checkbox.js

12 lines
367 B
JavaScript
Raw Normal View History

2012-04-01 18:46:34 +00:00
$('.check[checked="checked"]').parents(".checkbox").addClass("checked")
$(".checkbox").click(function(){
if($(this).children(".check").attr("checked")){
// uncheck
$(this).children(".check").attr('checked', false);
$(this).removeClass("checked");
}else{
// check
$(this).children(".check").attr({checked: "checked"});
$(this).addClass("checked");
}
});