From ce6b1ca2a57cbe75e26b1161cfb9de3a79e4fb4d Mon Sep 17 00:00:00 2001 From: mariusWeceipt Date: Thu, 30 Jun 2016 16:07:49 +0200 Subject: [PATCH] bind/unbind deprecated in jQuery 3 As of jQuery 3, bind() and unbind() methods are deprecated. Replaced these by on() and off() methods as required. --- jquery.tablesort.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery.tablesort.js b/jquery.tablesort.js index d82d856..6a3e5af 100644 --- a/jquery.tablesort.js +++ b/jquery.tablesort.js @@ -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; @@ -99,7 +99,7 @@ }, destroy: function() { - this.$sortCells.unbind('click.tablesort'); + this.$sortCells.off('click.tablesort'); this.$table.data('tablesort', null); return null; }