Title: FancyBox without link
Last modified: March 30, 2017

---

# FancyBox without link

 *  Resolved [datavalue](https://wordpress.org/support/users/datavalue/)
 * (@datavalue)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/fancybox-without-link/)
 * 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)

 *  [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/fancybox-without-link/#post-8974507)
 * 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?
 *  [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/fancybox-without-link/#post-8974540)
 * 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.

 * ![](https://ps.w.org/easy-fancybox/assets/icon-256x256.png?rev=3188201)
 * [Firelight Lightbox](https://wordpress.org/plugins/easy-fancybox/)
 * [Support Threads](https://wordpress.org/support/plugin/easy-fancybox/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-fancybox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-fancybox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-fancybox/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/fancybox-without-link/#post-8974540)
 * Status: resolved