Answer the question
In order to leave comments, you need to log in
Call popup on page close?
I want to implement just such a thing: when a user wants to leave the page, I need a pop-up with a questionnaire to pop up. Tell me how can this be done? Did I understand correctly that this cannot be done through the beforeunload event? If not, then how, maybe someone had experience of something similar.
It would be ideal if someone suggested something like this
Answer the question
In order to leave comments, you need to log in
The easiest option:
$(document).mouseleave(function(){$('#leaveModal').show();});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question