Skip to content

Commit

Permalink
bind/unbind deprecated in jQuery 3
Browse files Browse the repository at this point in the history
As of jQuery 3, bind() and unbind() methods are deprecated. Replaced these by on() and off() methods as required.
  • Loading branch information
mariusconjeaud committed Jun 30, 2016
1 parent 35403e6 commit ce6b1ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jquery.tablesort.js
Expand Up @@ -11,7 +11,7 @@
this.$thead = this.$table.find('thead');
this.settings = $.extend({}, $.tablesort.defaults, settings);
this.$sortCells = this.$thead.length > 0 ? this.$thead.find('th:not(.no-sort)') : this.$table.find('th:not(.no-sort)');
this.$sortCells.bind('click.tablesort', function() {
this.$sortCells.on('click.tablesort', function() {
self.sort($(this));
});
this.index = null;
Expand Down Expand Up @@ -99,7 +99,7 @@
},

destroy: function() {
this.$sortCells.unbind('click.tablesort');
this.$sortCells.off('click.tablesort');
this.$table.data('tablesort', null);
return null;
}
Expand Down

0 comments on commit ce6b1ca

Please sign in to comment.