Do you mean something like this? http://tonylea.com/go/examples/jquery-exit-popup/ Slide the cursor to the X button the popup will appear.
Thanks, but I was looking for something more simple, like an alert window that shows up when the user tries to close the page, that redirects to another page with another offer if the user choose to stay. Sorry if I can't explain it better, but I have very basic knowledge of Javascript.
You can use this: <script type="text/javascript"> window.onbeforeunload = function(e) { return ''; }; </script> Code (markup): Or this: <script type="text/javascript"> window.onbeforeunload = function(e) { e = e || window.event; e.preventDefault = true; e.cancelBubble = true; e.returnValue = ''; } </script> Code (markup):
Try this adding HTML and CSS to the popup. Method One This is a pure JavaScript solution, where you set the html and css option in the bioEp.init function call. bioEp.init({ html: '<div id="content">Your HTML goes here</div>', css: '#content {font-size: 20px;}' });