From 03b73508d4922359284a5a57f7a0c38282bd7500 Mon Sep 17 00:00:00 2001 From: Stefano Fenu Date: Thu, 12 May 2022 11:18:14 +0200 Subject: [PATCH 1/3] Jquery 3.x: Fix [shorthand-deprecated-v3] JQMIGRATE: jQuery.fn.click() event shorthand is deprecated and [pre-on-methods] JQMIGRATE: jQuery.fn.unbind() is deprecated --- jquery.treeview.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jquery.treeview.js b/jquery.treeview.js index 27cee3f..15bab44 100644 --- a/jquery.treeview.js +++ b/jquery.treeview.js @@ -59,7 +59,7 @@ }, applyClasses: function(settings, toggler) { // TODO use event delegation - this.filter(":has(>ul):not(:has(>a))").find(">span").unbind("click.treeview").bind("click.treeview", function(event) { + this.filter(":has(>ul):not(:has(>a))").find(">span").off("click.treeview").on("click.treeview", function(event) { // don't handle click events on children, eg. checkboxes if ( this == event.target ) toggler.apply($(this).next()); @@ -86,11 +86,11 @@ classes += this + "-hitarea "; }); $(this).addClass( classes ); - }) + }); } // apply event to hitarea - this.find("div." + CLASSES.hitarea).click( toggler ); + this.find("div." + CLASSES.hitarea).on("click", toggler ); }, treeview: function(settings) { From 40ce6978d877506353df828e872e3ef8505505c8 Mon Sep 17 00:00:00 2001 From: Stefano Fenu Date: Thu, 12 May 2022 12:06:43 +0200 Subject: [PATCH 2/3] Add stuff to change log --- changelog.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/changelog.md b/changelog.md index 29c6e19..87e9d5f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,13 @@ + +1.4.2 mod +--- +* Jquery 3.x fixes: [shorthand-deprecated-v3] JQMIGRATE: jQuery.fn.click() event shorthand is deprecated and [pre-on-methods] JQMIGRATE: jQuery.fn.unbind() is deprecated + +1.4.2 +--- +TODO + + 1.4.1 ----- * Fix for #2360 From 9dabea4ec1a1cbe275e6308ade4484da9082b3ca Mon Sep 17 00:00:00 2001 From: Stefano Fenu Date: Thu, 12 May 2022 12:28:24 +0200 Subject: [PATCH 3/3] [pre-on-methods] JQMIGRATE: jQuery.fn.hover() is deprecated --- jquery.treeview.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jquery.treeview.js b/jquery.treeview.js index 15bab44..898fe34 100644 --- a/jquery.treeview.js +++ b/jquery.treeview.js @@ -23,11 +23,11 @@ }, hoverClass: function(className) { className = className || "hover"; - return this.hover(function() { - $(this).addClass(className); - }, function() { - $(this).removeClass(className); - }); + return this.on("mouseenter", function () { + $(this).addClass(className); + }).on("mouseleave", function () { + $(this).removeClass(className); + }); }, heightToggle: function(animated, callback) { animated ?