Skip to content

tjrafferty/ysExitPopup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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,
    cookieValidity: 3,
    delay: 5
};
$('.test2').ysExit(options);

Default options

Option Description Default
cookieValidity Number of days to remember if the popup was closed 1
closeOnOutsideClick If true the popup will close when clicked outside true
delay Delay in ms until the popup is registered 0
debug If true, no cookie will be set to allow quick testing false

About

jQuery based exit popup model -

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 60.4%
  • HTML 26.0%
  • CSS 13.6%