@lupach – The close button by default is a span tag. There is no redirection on click action for it. That would be something added by either you or another plugin somehow. We don’t use onClick attributes at all, in fact all of our JS is written in the popup-maker-site.js and popup-maker-site.min.js files.
Also looking at it the function called is redireccion() and that is not even in english. Google translate says its Catalan, but either way anything in our plugin would be english, so even if we added it the function name would be redirect().
First I have seen that, but it is being added outside of the popup maker plugin. You can see the template here https://github.com/PopupMaker/Popup-Maker/blob/master/includes/popup-functions.php#L282
Further digging found that the redireccion() function is defined in your theme in the following JS file
http://vif.proximamente.mx/wp-content/themes/Creativity/js/gk.scripts.js?ver=4.1.1
Not sure how/why they are adding that call to our popup close link, and we have made every attempt to namespace the classes so to avoid things like this. No other plugin/theme uses classes prefixed with popmake- which should prevent this type of stuff.
Hope this helps.
Thread Starter
lupach
(@lupach)
I see, I will have to check on those scripts, in the mean time I kindda hid the button and activated all other ways to close the pop up.
I also tried to use the automatic close after an amount of time but to no avail
I used this
`<script type=”text/javascript”>
setTimeout(function () {
jQuery(‘#popmake-1977’).popmake(‘close’);
}, 5000); // 5 seconds
</script>`
But either I am missing something or there is something going on here… I pasted that in the header, in the template of the page, heck even on the popup and nothing.
Any help with this?
@lupach – Our scripts don’t run in the head and are not even loaded until the footer. Closing it using something like your using there would not be beneficial to your situation as it would close the popup before the popup is even open. The code above basically says wait 5 seconds after that code is run then close it. Since the popup doesn’t open until clicked that script won’t help.
Any script we write will be overwritten by the onClick attribute. You can either modify that JS function or figure out how to prevent it from being added to the popmake close button.