Where to add the JS code and which code to use?
-
Hi,
I need to know about how to set the cookies when people submit the form, the popup will never appears again.
1) Where should i place the code?
After reading your doc “Using Triggers and Cookies Together” , i wanna use the Custom CSS and JS plugin. I know there is 3 ways of doing it. and this is one of them. Is this correct?
Also, within the plugin, there are options to select and i dont know which one to use. ??
Linking type
-External File
-InternalWhere on page
-Header
-FooterWhere in site
-In Frontend
-In Admin2) Another question is which code to use?
I have followed the steps in your doc, but i need to know if the code im using is correct. What is in my mind is this (my form is popmake-132 and my cookie name is pum-132:
jQuery('#popmake-132 form').on('submit', function () { var $this = jQuery('#popmake-132'), settings = $this.data('popmake'), auto_open = settings.meta.auto_open, cookie_name = "popmake-auto-open-" + settings.id; if (auto_open !== undefined && auto_open.enabled && auto_open.cookie_key !== undefined && auto_open.cookie_key !== '') { cookie_name = cookie_name + "-" + auto_open.cookie_key; } jQuery.pm_cookie( pum-132, // The cookie name that is checked prior to auto opening. true, // Setting a cookie value of true. '10 years', // Plain english time frame. '/' // Cookie path of / means site wide. ); });
Could you please tell me if this is so wrong. im not very good at coding and i really need your help.
Thank you! appreciate your help.
- The topic ‘Where to add the JS code and which code to use?’ is closed to new replies.