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/javascripts/lib/module-area.js

8 lines
473 B
JavaScript

$(function() {
$('.module-area [data-toggle=buttons-checkbox]').find('input[type="checkbox"]').each(function() {
$(this).prop('checked') ? $(this).siblings('input[type="hidden"]').val(1) : $(this).siblings('input[type="hidden"]').val(0);
});
$('.module-area').delegate('input[type="checkbox"]', clickEvent, function(event) {
$(this).prop('checked') ? $(this).siblings('input[type="hidden"]').val(1) : $(this).siblings('input[type="hidden"]').val(0);
});
});