-1

I would need to trigger a pop by replicating a click event after 10 sec using the following HTML with jQuery only once for the user. Any click trigger snippet that might do? and if possible to set cookie in the code so not to show the pop again for the same user? thanks.

<a href="https://example.com" class="register" data-target="MyRegister" data-tooltip="Register"></a>

Note: I can not using the class as that will trigger the link not the pop. It needs to be done using the data-target and I don't seem able to make it work.

Also please I can not use another pop, it needs to be the one above! This to avoid suggestions of using third party pops etc..

If someone can help with jQuery snippet for this would be great, thank.

Surfer
  • 1
  • 3
  • use fanybox for your pop up and for cockie read this: https://www.w3schools.com/js/js_cookies.asp – episch Oct 07 '17 at 00:02

1 Answers1

0

Never mind I solved it very simply and actually the selector method works!

Anyone interested here is the code

setTimeout(function() {
   $('.register').trigger('click');
}, 60000);
Surfer
  • 1
  • 3