$('#demo1 div.checkbox').shiftcheckbox({
checkboxSelector: ':checkbox',
selectAll: $('#demo1 .all'),
// The onChange function will be called whenever the plugin changes the state of a checkbox.
onChange: function(checked) {
setInfoText('Changed checkbox ' + $(this).attr('id') + ' to ' + checked + ' programmatically');
}
});
// If you also want to handle the user clicking on a checkbox, use the jQuery .change() event.
$('#demo1 :checkbox').change(function() {
setInfoText('Clicked checkbox ' + $(this).attr('id') + ', checked=' + this.checked);
});
shiftcheckbox-gh-pages.zip
( 38.07 KB 下载:205 次 )
AD:真正免费,域名+虚机+企业邮箱=0元