Title: Uncaught ReferenceError: easy_fancybox_handler is not defined
Last modified: August 21, 2016

---

# Uncaught ReferenceError: easy_fancybox_handler is not defined

 *  [cswagerty](https://wordpress.org/support/users/cswagerty/)
 * (@cswagerty)
 * [13 years ago](https://wordpress.org/support/topic/uncaught-referenceerror-easy_fancybox_handler-is-not-defined/)
 * Hi Easy Fancy Box,
 * I love the look of your plugin, but I can’t get it working for YouTube videos.
 * 
 * Then, I downloaded the newer version that fixed the errors in the admin screen,
   but now the plugin isn’t working at all for youtube videos.
 * In my console, I get the following errors:
 * Uncaught ReferenceError: easy_fancybox_handler is not defined dev.mysite.com:
   313
    (anonymous function)
 * Which occurs in this line of code:
    `jQuery(document).on('ready gform_post_render',
   easy_fancybox_handler );`
 * and
 * Uncaught SyntaxError: Unexpected token >
 * which occurs around this line of code:
 *     ```
       jQuery('a[href*="youtube.com/watch"]:not(.nofancybox), area[href*="youtube.com/watch"]:not(.nofancybox)').addClass('fancybox-youtube');
       	jQuery('a[href*="youtu.be/"]:not(.nofancybox), area[href*="youtu.be/"]:not(.nofancybox)')<br />
       ```
   
 * Any help would be appreciated, thanks!
 * [http://wordpress.org/extend/plugins/easy-fancybox/](http://wordpress.org/extend/plugins/easy-fancybox/)

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

 *  Thread Starter [cswagerty](https://wordpress.org/support/users/cswagerty/)
 * (@cswagerty)
 * [13 years ago](https://wordpress.org/support/topic/uncaught-referenceerror-easy_fancybox_handler-is-not-defined/#post-3702081)
 * Hey EasyFancyBox, do you need more info from me about this problem? I thought
   this would be enough to go on.
 *  Thread Starter [cswagerty](https://wordpress.org/support/users/cswagerty/)
 * (@cswagerty)
 * [13 years ago](https://wordpress.org/support/topic/uncaught-referenceerror-easy_fancybox_handler-is-not-defined/#post-3702082)
 * Update:
    the errors from my first post only show when I set `define('WP_DEBUG',
   true);` in wp-config.`
 * However, I’m back to my first problem. Easy FancyBox is only working for links
   where class=”fancybox-youtube” is explicitly defined. Normal youtube links or
   shortlinks aren’t shown in fancybox.
 * This leads me to believe that auto-detect isn’t working.
 * Any ideas of things to try?
 * Thanks!
 *  [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [13 years ago](https://wordpress.org/support/topic/uncaught-referenceerror-easy_fancybox_handler-is-not-defined/#post-3702092)
 * Hi cswagerty, can you share a link to your website? I’d need to see it live to
   read possible errors in the script console to learn more about the issue…

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

The topic ‘Uncaught ReferenceError: easy_fancybox_handler is not defined’ 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/)

## Tags

 * [Easy Fancy Box](https://wordpress.org/support/topic-tag/easy-fancy-box/)
 * [Youtube](https://wordpress.org/support/topic-tag/youtube/)

 * 3 replies
 * 2 participants
 * Last reply from: [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/uncaught-referenceerror-easy_fancybox_handler-is-not-defined/#post-3702092)
 * Status: not resolved