Creating a Jquery Exit Popup

Created November 7, 2011

Isn't it super annoying when you visit a website and upon closing the page a Javascript alert Pops up and asks you if you really want to leave or stay on the site. Instead a less annoying way of doing this would be to use Jquery and when the users cursor reaches the top of the page, usually a sign that the user is going to close the webpage, a Jquery lightbox will popup.

This is very easy to accomplish and I think it's absolutely ridiculous to have to pay for this kind of functionality, for instance Action Popup is a simple script that you install on your server and it will display a Jquery exit popup on the page when the user is about to exit. They want to sell you this script for $47. Well, instead of paying that $47, just simply download the following file:


all that is required is to include 'exitpopup.php' to your server and include it on your page:


That's it, now you'll have an exit popup on your page. Oh, Yeah you'll need to make sure that the JQuery library is being linked to on the page.

You can simply view the Demo here. Or Download the script here.

Hope someone can find this useful. And if you have any questions at all, please feel free to drop me a comment :) Thank You.