Replace deprecated jQuery.nodeName
authorFomafix <fomafix@googlemail.com>
Fri, 17 Mar 2017 14:42:20 +0000 (15:42 +0100)
committerFomafix <fomafix@googlemail.com>
Fri, 17 Mar 2017 14:45:49 +0000 (15:45 +0100)
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
resources/src/jquery/jquery.makeCollapsible.js

index 70dc105..847afd4 100644 (file)
@@ -16,7 +16,7 @@
                        color = $.css( elem, attr );
 
                        // Keep going until we find an element that has color, or we hit the body
                        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;
                        }
 
                                break;
                        }
 
index eef3846..7296811 100644 (file)
                        if (
                                e.type === 'click' &&
                                options.linksPassthru &&
                        if (
                                e.type === 'click' &&
                                options.linksPassthru &&
-                               $.nodeName( e.target, 'a' ) &&
+                               e.target.nodeName.toLowerCase() === 'a' &&
                                $( e.target ).attr( 'href' ) &&
                                $( e.target ).attr( 'href' ) !== '#'
                        ) {
                                $( e.target ).attr( 'href' ) &&
                                $( e.target ).attr( 'href' ) !== '#'
                        ) {