Orbit/app/assets/javascripts/inc/permission-checkbox.js

22 lines
580 B
JavaScript
Raw Permalink Normal View History

$(document).ready(function() {
2012-04-26 08:13:21 +00:00
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 },
});
2012-04-26 08:13:21 +00:00
};