Skip to content

Instantly share code, notes, and snippets.

@bes89
bes89 / exit-notice.html
Created July 14, 2012 16:39 — forked from abits/exit-notice.html
Do stuff when user exits site.
<!-- This is a short demo how js could detect whether a user wants to leave the site.
Tested with Firefox and Chrome. (c) Christoph Martel <chris@codeways.org> -->
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">