jAlert is not a function / Timeout not working
-
Hello,
I’ve installed Exit Notifier today and had troubles getting it work.
I’m using wordpress 5.7.2 and Exit Notifier 1.9.1
When using default settings, I’ll encounter the following error when clicking an external link:
frontend.js?ver=1.9.1:88 Uncaught TypeError: jQuery.jAlert is not a function at HTMLAnchorElement.exit_notifier_leave_now (frontend.js?ver=1.9.1:88) at HTMLDocument.dispatch (jquery.js:5429) at HTMLDocument.elemData.handle (jquery.js:5233)
jAlert.min.js and jAlert.min.css are loaded.
Because of this error i changed to SweetAlert2 in the backend settings. The popup is displayed now, but the timeout does not work (the buttons won’t get “clicked” after the timer ends).
I looked through your code and found the following:
if(timeleft <= 0) { clearInterval(countdownTimer); jQuery(".confirmBtn").click(); }
When inspecting the SweetAlert2 popup, i cannot find an element with the css-class “confirmBtn”. Is it possible that this button only exists in jAlert’s popup?
Also i wanted to thank you for making this plugin.
Have a nice day,
Michael
- The topic ‘jAlert is not a function / Timeout not working’ is closed to new replies.