From 44bd9c082b27d15778b71beb03629a1e2ac7a656 Mon Sep 17 00:00:00 2001 From: Steven Benner Date: Tue, 20 Feb 2024 19:44:50 -0800 Subject: [PATCH] Replace `jQuery.type()` check with `typeof` This method was deprecated in jQuery version 3.3, and removed from jQuery as of version 4.0.0-beta. * https://api.jquery.com/category/deprecated/deprecated-3.3/ * https://blog.jquery.com/2018/01/19/jquery-3-3-0-a-fragrant-bouquet-of-deprecations-and-is-that-a-new-feature/ * https://blog.jquery.com/2024/02/06/jquery-4-0-0-beta/ Related to issue: #186 and #189 --- src/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.js b/src/core.js index 9e14083..7f3bdfb 100644 --- a/src/core.js +++ b/src/core.js @@ -93,7 +93,7 @@ $.fn.powerTip = function(opts, arg) { } // handle api method calls on the plugin, e.g. powerTip('hide') - if ($.type(opts) === 'string' && $.powerTip[opts]) { + if (typeof opts === 'string' && $.powerTip[opts]) { return $.powerTip[opts].call(targetElements, targetElements, arg); }