Ray's js code for status in form

This commit is contained in:
chris 2013-09-11 19:24:58 +08:00
parent 911cfdc980
commit 17d7912e07
1 changed files with 6 additions and 8 deletions

View File

@ -1,10 +1,8 @@
$(function() { $(function() {
$(document).on('click',"*[data-toggle=buttons-checkbox] input",function(){ $('.module-area [data-toggle=buttons-checkbox]').find('input[type="checkbox"]').each(function() {
var d = $(this).parent().find("input[type=hidden]"); $(this).prop('checked') ? $(this).siblings('input[type="hidden"]').val(1) : $(this).siblings('input[type="hidden"]').val(0);
if($(this).is(":checked")){ });
d.val("1"); $('.module-area').delegate('input[type="checkbox"]', clickEvent, function(event) {
}else{ $(this).prop('checked') ? $(this).siblings('input[type="hidden"]').val(1) : $(this).siblings('input[type="hidden"]').val(0);
d.val("0"); });
}
})
}); });