• Resolved datavalue

    (@datavalue)


    Hi,

    I try to customize a shopping cart plugin in order to display a FancyBox after adding a product to cart instead of being redirected directly to cart.
    But I can’t find how to display a FancyBox without using a link.
    Is it possible ?

    Thank you very much for your help.

    Cédric

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Cédric, fancybox always needs a link but it does not have to be a human that clicks the link. It does not even have to be a visible link. It can be a hidden link that is triggered by javascript for example.

    Maybe that notion helps you to the next step in your shopping cart integration?

    OR, here is an example where the light box is fired directly by jQuery on the “document.ready” event :

    
    jQuery(document).ready(function() {
    	$.fancybox(
    		'<h2>Hi!</h2><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam quis mi eu elit tempor facilisis id et neque</p>',
    		{
            		'autoDimensions'	: false,
    			'width'         		: 350,
    			'height'        		: 'auto',
    			'transitionIn'		: 'none',
    			'transitionOut'		: 'none'
    		}
    	);
    });
    

    This could be done in a similar way on events like a product being added to a cart…

    But you don’t need my plugin for this 😉

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘FancyBox without link’ is closed to new replies.