Skip to content

Instantly share code, notes, and snippets.

@klauskpm
Created April 14, 2014 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klauskpm/10676403 to your computer and use it in GitHub Desktop.
Save klauskpm/10676403 to your computer and use it in GitHub Desktop.
Jquery - Before Unload
$(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