Forked from anonymous/Popup Maker - at 3 pages popup
Last active
June 4, 2016 19:19
-
-
Save rwkyyy/ba13bdecac636ec7de2e86850028dc88 to your computer and use it in GitHub Desktop.
Simle jQuery to show a popup at 3rd page of a visitor - Wordpress Popup Maker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function ($) { | |
{ | |
var visited = Cookies.get('visited'); | |
if (visited == undefined) { | |
Cookies.set('visited', 0, {path: '/'}); | |
} | |
else if (visited < 2) { | |
Cookies.set('visited', ++visited, {path: '/'}); | |
} | |
else if (visited == 2) { | |
setTimeout(function () { | |
$(".popmake-17158").trigger("click"); | |
}, 3000); | |
Cookies.set('visited', ++visited, {expires: 30, path: '/'}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment