This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/assets/Archive/javascripts/inc/permission-checkbox.js

22 lines
580 B
JavaScript

$(document).ready(function() {
permissionCheckbox();
});
function permissionCheckbox(){
$('.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");
}
});
$(".checkbox").popover({
trigger: 'hover',
placement: 'bottom',
delay: { show: 100, hide: 300 },
});
};