1.0.2 • Published 7 years ago

ysexitpopup v1.0.2

Weekly downloads
5
License
ISC
Repository
github
Last release
7 years ago

YsExitPopup npm

ysExitPopup is a really simple jQuery exit modal plugin that shows a cookie-enabled modal popup when your cursor moves out of view. Useful to create a confirm dialog asking the users to confirm if they want to quit your webpage.

Requires

Latest jQuery plugin js.

Install

Via Node

npm install ysexitpopup --save

Include YsExitPopup css and js files.

<link rel="stylesheet" href="../css/ysExit.css" type="text/css">
<script src="../js/jquery.min.js"></script>
<script src="../js/ysExit.min.js"></script>

Example

var options = 
{
	debug: true,
	cookieName: 'subscribe-popup'
    cookieValidity: 3,
    delay: 5
};
$('.test2').ysExit(options);

Default options

OptionDescriptionDefault
cookieNameName of the cookieysExit
cookieValidityNumber of days to remember if the popup was closed1
closeOnOutsideClickIf true the popup will close when clicked outsidetrue
delayDelay in ms until the popup is registered0
debugIf true, no cookie will be set to allow quick testingfalse