Press "Enter" to skip to content

Exit Intent Cookies Popup Plugin With jQuery | Stick to Me

🦉 The jQuery “Stick to me” plugin allows you to create exit popups on your webpage so that you can capture visitors as they are about to leave.

Just another “popup exit” plugin built with jQuery that shows a configurable, cookie-enabled popup for when the user is about to leave the current page. The plugin detects mouse position (when it moves up to the address bar) and then triggers an event to trigger a modal popup.

Stick-to-me tracks mouse movement and detects when to trigger a popup. See working on the gif below.

How to make use of it:

1. Include the stylesheet stick-to-me.css to style the exit popup.

<link rel="stylesheet" href="stick-to-me.css">

2. Add your personal content to the exit popup.

<div id="stickLayer" style="display:none;" class="stick_popup">
  <div class="stick_close" onclick="$.stick_close()">X</div>
  <div class="stick_content">
    <h1>Goodbye!</h1>
  </div>
</div>

3. Include the jQuery library and the JavaScript file stick-to-me.js on the backside of the webpage.

<script src="//code.jquery.com/jquery.min.js"></script>
<script src="stick-to-me.js"></script>

4. Initialize the plugin to create a default exit popup when the cursor moves out of view.

$.stickToMe({
  layer: '#stickLayer'      
});

5. You are capable of configuring the exit popup with the next choices.

$.stickToMe({
  // <a href="https://www.jqueryscript.net/animation/">Animation</a> speed in ms
  fadespeed: 400,
  // Where detection of exit intent takes place
  trigger: ['top'],
  // min/max time
  maxtime: 0,
  mintime: 0,
  // Delay before showing popup when exit intent is detected
  delay: 0,
  // Interval between popups
  interval: 0,
  // Maximum times the popup will be triggered  
  maxamount : 0,
  // Set cookie to prevent opening again on the same browser
  cookie : false,
  // Define the cookie expiration in seconds
  cookieExpiration: 0,
  // Clickon background to close the popup
  bgclickclose : true,
  // Press ESC to close the popup
  escclose : true,
  // Chrome disable
  disableleftscroll : true,
  // Callback function
  onleave : function (e) {},
});

Cookie-enabled Exit Intent Popup Plugin, Stick to me Github, javascript exit intent popup, exit intent popup codepen, exit intent popup, exit intent popup jquery, exit popup jquery plugin, exit intent popup WordPress

Read More  Responsive Sidebar Menu With SubMenu HTML CSS and JavaScript


See Demo And Download

Official Website(guiassemany): Click Here

This superior jQuery/javascript plugin is developed by guiassemany. For extra Advanced Usages, please go to the official website.

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *