Open jgoullet opened 2 years ago
Hello,
I try to check if the content in page changed before closing the popup. I'm trying to use onbeforeunload function but with no success.
window.onbeforeunload = function (e) { $('.magnific-popup')magnificPopup({ callbacks: { open: function() { $.magnificPopup.instance.close = function() { var confirmed = confirm('test'); if(!confirmed) { return; } $.magnificPopup.proto.close.call(this); } }
}); }
Thanks!
Hello,
I try to check if the content in page changed before closing the popup. I'm trying to use onbeforeunload function but with no success.
window.onbeforeunload = function (e) { $('.magnific-popup')magnificPopup({ callbacks: { open: function() { $.magnificPopup.instance.close = function() { var confirmed = confirm('test'); if(!confirmed) { return; }
$.magnificPopup.proto.close.call(this); } }
}); }
Thanks!