Plugin Help - Popups - Wordpress Popup

manpreet

Power Member
Joined
Nov 3, 2011
Messages
631
Reaction score
156
I need help on this plugin "Popups - Wordpress Popup" (- by timersys). Any chance I can stop the popup close if user has clicked out-side box element.

I have tried looking for the code everywhere but still cannot find to delete, looked for:

stop propagation
hide
close
exit

If anyone has an idea that'd be much appreciate I've been racking my brain looking for it now. Also, if you can let me know how it was found it'll be useful my learning as I like to do most of the editing myself now.
 
Register a click event to the document. Inside your handler, check if the clicked element (target) is the popup or its descendants, if not, then take the popup's global object (if it has one), and use its api to close it, otherwise find the dom element of the popup (the root) and add a class/or inline styles to hide it, or remove it entirely from the dom if you don't need the popup anymore.
 
Register a click event to the document. Inside your handler, check if the clicked element (target) is the popup or its descendants, if not, then take the popup's global object (if it has one), and use its api to close it, otherwise find the dom element of the popup (the root) and add a class/or inline styles to hide it, or remove it entirely from the dom if you don't need the popup anymore.

Thanks for the reply. I think you misunderstood the question. Basically i want to ensure the popup DOESNT close if it's clicked anywhere apart from the specific box element. I have tried looking at for the functions that could hide/close the popup so i can delete the functions but thats what I'm having trouble finding
 
Back
Top