0

I have loaded the appropriate fancybox script and the stylesheet, and initialized the simplest version of fancy box that I can. I have never had this problem before, and the code works fine in a JSfiddle, but this time I get the loading icon appearing right smack in the middle of the page, before any fancy boxes are intentionally triggered.

http://www.michaladarling.com/

And then when I click on the small thumbnails at the bottom to launch the fancy box, I get an error in my console that reads:

Uncaught TypeError: Object # has no method 'onCleanup'

Something small must be off and I just can't see it.

JFK
  • 40,963
  • 31
  • 133
  • 306
helgatheviking
  • 25,596
  • 11
  • 95
  • 152
  • The WordPress theme I was using was preferentially loading its version of FancyBox which is the older version 1 and not the newer version 2. – helgatheviking Jan 23 '13 at 14:25
  • Voting for clsoe. Please don't ask SO users to browse your site and find errors. First try to do some debugging by yourself, then extract not-working snippet from your code and then ask question here providing proper piece of code. – Peter Jan 23 '13 at 20:58
  • Apologies Peter, I know the question is a bit thin, but SO is my place of last resort and I tried a lot of things before posting, sometimes there isn't code to post. I needed to show the incorrect loader and I always ask people I help with WordPress to provide a URL, so it seemed pertinent. The question isn't as localized as I thought as JFK's answer provided a link that explains the error code I received as a mismatch between Fancybox assets. – helgatheviking Jan 24 '13 at 19:32

1 Answers1

0

"...I get the loading icon appearing right smack in the middle of the page, before any fancy boxes are intentionally triggered."

That is not the fancybox's loading icon but nivoslider's loading icon. Check here.


"...I get an error in my console that reads: "

Uncaught TypeError: Object # has no method 'onCleanup'

That error is generated when the fancybox css file is missing as you can see it here.

In your specific case, you are using the fancybox v2.1.4 css file with the fancybox v2.1.3 js file ... so there is a version mismatch.

Just upgrade the fancybox js file to v2.1.4

Community
  • 1
  • 1
JFK
  • 40,963
  • 31
  • 133
  • 306
  • Thanks for the explanations. I was actually seeing: http://www.michaladarling.com/wp-content/themes/clean-child/js/fancybox/fancybox_loading.gif so the fancybox loader. The problem was as you described, my WordPress theme was loading the wrong script (v1.something). – helgatheviking Jan 23 '13 at 18:53