Created
April 14, 2014 19:29
-
-
Save klauskpm/10676403 to your computer and use it in GitHub Desktop.
Jquery - Before Unload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).bind("beforeunload",function(evento) | |
{ | |
// Insert the text that you want to return in the box | |
return "Text of the box"; | |
}).unload(function() | |
{ | |
// Any action that you want to do if chose do leave | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment