Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save danieliser/3a7195d97516697236dc3eb0d49046f3 to your computer and use it in GitHub Desktop.
Save danieliser/3a7195d97516697236dc3eb0d49046f3 to your computer and use it in GitHub Desktop.
Simle jQuery to show a popup at 3rd page of a visitor - Wordpress Popup Maker
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