From e2077e4f7af64a865539d3b376ad6268ab71968f Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 2 Sep 2021 10:41:09 +0200 Subject: [PATCH] Fix jmigrate warnigns in toastr.js --- toastr.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/toastr.js b/toastr.js index e2fbc0d0..3acdb202 100644 --- a/toastr.js +++ b/toastr.js @@ -288,15 +288,15 @@ function handleEvents() { if (options.closeOnHover) { - $toastElement.hover(stickAround, delayedHideToast); + $toastElement.on("mouseenter", stickAround).on("mouseleave", delayedHideToast); } if (!options.onclick && options.tapToDismiss) { - $toastElement.click(hideToast); + $toastElement.on("click", hideToast); } if (options.closeButton && $closeElement) { - $closeElement.click(function (event) { + $closeElement.on("click", function (event) { if (event.stopPropagation) { event.stopPropagation(); } else if (event.cancelBubble !== undefined && event.cancelBubble !== true) { @@ -312,7 +312,7 @@ } if (options.onclick) { - $toastElement.click(function (event) { + $toastElement.on("click", function (event) { options.onclick(event); if (options.tapToDismiss) { hideToast();