Title: Getting error: Uncaught TypeError: n.fancybox.getInstance is not a function
Last modified: February 11, 2021

---

# Getting error: Uncaught TypeError: n.fancybox.getInstance is not a function

 *  Resolved [skullmonkey](https://wordpress.org/support/users/skullmonkey/)
 * (@skullmonkey)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/getting-error-uncaught-typeerror-n-fancybox-getinstance-is-not-a-function/)
 * Hello,
    I’m trying to make it work but simply cannot. On page load I get error:
 *     ```
       Uncaught TypeError: n.fancybox.defaults is undefined
           jQuery 14
               <anonymous>
               e
               t
               setTimeout handler*l/<
               c
               fireWith
               fire
               c
               fireWith
               ready
               B
               EventListener.handleEvent*
               <anonymous>
               <anonymous>
       ```
   
 * and when I click I get:
 *     ```
       Uncaught TypeError: n.fancybox.getInstance is not a function
           jQuery 12
               i
               dispatch
               handle
               add
               add
               ke
               each
               each
               ke
               on
               <anonymous>
               <anonymous>
       ```
   
 * This was for clicking image.
 * When I create just simple text hyperlink on the same page I get: Cross-Origin
   Request Blocked: The Same Origin Policy disallows reading the remote resource
   at [https://www.youtube.com/watch?v=Vpg9yizPP_g&autoplay=0](https://www.youtube.com/watch?v=Vpg9yizPP_g&autoplay=0).(
   Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
 * Any help would be appreciated.
 * Thanks,
    S@
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fgetting-error-uncaught-typeerror-n-fancybox-getinstance-is-not-a-function%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Noor Alam](https://wordpress.org/support/users/naa986/)
 * (@naa986)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/getting-error-uncaught-typeerror-n-fancybox-getinstance-is-not-a-function/#post-14037334)
 * [@skullmonkey](https://wordpress.org/support/users/skullmonkey/), You don’t seem
   to be using this plugin.
 *  Thread Starter [skullmonkey](https://wordpress.org/support/users/skullmonkey/)
 * (@skullmonkey)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/getting-error-uncaught-typeerror-n-fancybox-getinstance-is-not-a-function/#post-14037345)
 * Not any more. I found another way and didnt have time to wait. Sorry.

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

The topic ‘Getting error: Uncaught TypeError: n.fancybox.getInstance is not a function’
is closed to new replies.

 * ![](https://ps.w.org/wp-fancybox/assets/icon-128x128.png?rev=2610063)
 * [WP fancybox](https://wordpress.org/plugins/wp-fancybox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-fancybox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-fancybox/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-fancybox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-fancybox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-fancybox/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [skullmonkey](https://wordpress.org/support/users/skullmonkey/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/getting-error-uncaught-typeerror-n-fancybox-getinstance-is-not-a-function/#post-14037345)
 * Status: resolved