Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Damian

    (@timersys)

    It should work by adding the ID of the popup to a link Eg: if you popup ID is 4 the link should be:
    <a href="#4">Click here</a>

    Thread Starter Vince

    (@vincefapbriccom)

    Thanks. That didn’t work for me. Is there not a function that can be called to get it to show?

    Thanks

    Plugin Author Damian

    (@timersys)

    no on this version. Can you paste a link ? last time I tried was working fine

    Thread Starter Vince

    (@vincefapbriccom)

    Thanks, but I don’t have an external link that I can share to show it. I’m doing a workaround to get it to work with jQuery like
    jQuery(“#spu-4,#spu-bg-4”).show();

    Plugin Author Damian

    (@timersys)

    Sorry I just realized I pasted the wrong code.

    Try :
    <a href="#spu-4">Click here</a>

    spu- is the plugin prefix and should be always included

    Thread Starter Vince

    (@vincefapbriccom)

    That works. Thanks

    Plugin Author Damian

    (@timersys)

    Glad it worked, please support us

    Thread Starter Vince

    (@vincefapbriccom)

    How do you suggest being able to have it only triggered on click of a button? I don’t want it to appear unless someone clicks. Even if it is hidden and I push out the delay time, only the background appears if I trigger it before that time is reached. Hope that makes sense.

    Plugin Author Damian

    (@timersys)

    Hi Vince, you are right. I tried on an already poped popup. If you feel confortable editing js change on popups/public/assets/public.js around line 206

    The following:

    // add link listener for this box
    			$('a[href="#' + $box.attr('id') +'"]').click(function() { toggleBox(id, true); return false; });

    Replace it with :

    // add link listener for this box
    			$('a[href="#' + $box.attr('id') +'"]').click(function() { 
    
    				//if is a centered popup, center it
    				if( $box.hasClass('spu-centered') ) {
    
    					centerBox( id );
    
    				}				
    
    				toggleBox(id, true);
    				return false;
    			});

    I will add it for the next release anyway but im not sure when is going to happen

    Thread Starter Vince

    (@vincefapbriccom)

    Thanks Damian, that’s no problem for me to change.

    Thread Starter Vince

    (@vincefapbriccom)

    Damian, that didn’t work for me. I still only get the background and not the popup. It’s clearly being rendered in the html, but it doesn’t display.

    Thanks

    Plugin Author Damian

    (@timersys)

    Did you cleared cache and ensured the js was modified on that page?

    Thread Starter Vince

    (@vincefapbriccom)

    The plugin is using the version in the assets/js/min folder so that’s probably why. What minifier did you use?

    Plugin Author Damian

    (@timersys)

    I use codekit for minification but you could use any you want and replace that code. OR add to functions.php :

    define('SPU_DEBUG_MODE' , true);

    to use unminified version

    Thread Starter Vince

    (@vincefapbriccom)

    I’m just using the un-minified version in the min folder for now. The links woks now. Thanks

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Trigger on click’ is closed to new replies.