Skip to content

Commit

Permalink
Client side: I discovered jquery closest() :D
Browse files Browse the repository at this point in the history
  • Loading branch information
o5 committed Aug 29, 2013
1 parent 2294845 commit 5c4a92e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client-side/grido.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
$(_this.selector, _this.grido.$element).each(function() {
var val = $(this).prop('checked');
$(this).prop('checked', !val);
_this.changeRow($(this).parent().parent(), !val);
_this.changeRow($(this).closest('tr'), !val);
});

return false;
Expand All @@ -247,7 +247,7 @@
$(this.selector, this.grido.$element)
.off('change.grido')
.on('change.grido', function() {
$.proxy(_this.changeRow, _this)($(this).parent().parent(), $(this).prop('checked'));
$.proxy(_this.changeRow, _this)($(this).closest('tr'), $(this).prop('checked'));
});
},

Expand Down

0 comments on commit 5c4a92e

Please sign in to comment.