From 67bb65b8f93410284eed7295c16946209fd86377 Mon Sep 17 00:00:00 2001 From: Fomafix Date: Fri, 17 Mar 2017 15:42:20 +0100 Subject: [PATCH] Replace deprecated jQuery.nodeName jQuery.nodeName gets deprecated in jQuery 3.2.0. [1] [2] [1] https://blog.jquery.com/2017/03/16/jquery-3-2-0-is-out/ [2] https://github.com/jquery/jquery/issues/3475 Change-Id: I7e6d5191e4db5117dbcfa89b07f25e672ed1e4d2 --- resources/src/jquery/jquery.color.js | 2 +- resources/src/jquery/jquery.makeCollapsible.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/src/jquery/jquery.color.js b/resources/src/jquery/jquery.color.js index 70dc1057a6..847afd4e86 100644 --- a/resources/src/jquery/jquery.color.js +++ b/resources/src/jquery/jquery.color.js @@ -16,7 +16,7 @@ color = $.css( elem, attr ); // Keep going until we find an element that has color, or we hit the body - if ( color !== '' && color !== 'transparent' || $.nodeName( elem, 'body' ) ) { + if ( color !== '' && color !== 'transparent' || elem.nodeName.toLowerCase() === 'body' ) { break; } diff --git a/resources/src/jquery/jquery.makeCollapsible.js b/resources/src/jquery/jquery.makeCollapsible.js index eef3846eb2..7296811e31 100644 --- a/resources/src/jquery/jquery.makeCollapsible.js +++ b/resources/src/jquery/jquery.makeCollapsible.js @@ -159,7 +159,7 @@ if ( e.type === 'click' && options.linksPassthru && - $.nodeName( e.target, 'a' ) && + e.target.nodeName.toLowerCase() === 'a' && $( e.target ).attr( 'href' ) && $( e.target ).attr( 'href' ) !== '#' ) { -- 2.20.1