Skip to content

Commit f15d23d

Browse files
committed
#1 Implemented events on master checkbox
1 parent 136cd9d commit f15d23d

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

jquery.tablecheckbox.js

+9
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,18 @@
8282
// Listen for changes on the checkbox in the table header and apply its current state
8383
// to all checkboxe on the table.
8484
$headCheckbox.on('change', function(e) {
85+
var $allRows = $table.find('tbody tr');
8586
$checkboxes
8687
.prop('checked', _private.config.isChecked($headCheckbox))
8788
.trigger('change');
89+
$table.trigger(
90+
_private.config.isChecked($headCheckbox) ? 'multirowselect' : 'multirowdeselect',
91+
{
92+
$rows: $allRows,
93+
$checkboxes: $allRows.find(_private.config.checkboxSelector),
94+
rowcount: $allRows.length
95+
}
96+
);
8897
});
8998
// Cycle through each checkbox found on the table.
9099
$checkboxes.each(function() {

jquery.tablecheckbox.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)