I have really strange problem with fancybox(2.x). I was using this script for ages but i hadn't experienced such problem before.
So, i have website: http://tinyurl.com/6mx7an8 and i've included every jquery/fancybox files as manual says but the JS console gives me the error
Uncaught TypeError: Object [object Object] has no method 'fancybox'
Have you any idea what am i doing wrong? Any help would be appreciated :)
There are couple of issues in your website.
$
, so your code is not working because $
is not an alias for jQuery
anymore. You can use jQuery.noConflict()
to avoid conflicts with other libraries on the page which use the same variable $
.Looks like jQuery is included twice, once near the top of the head and once near the bottom.
I had a similar problem. Somehow, jQuery was being loaded twice. Turns out while testing something, I added a drupal_add_js line to load jquery in a block, which was disabled, but Drupal still evaluated the PHP in the disabled block.
When I removed the drupal_add_js line from the block, jQuery loaded fine, once per page.
I have a css unify php script on my website that added both jquery and jquery postmessage plugin into the same javascript file.
So it was giving me the error above.
I have loaded the jquery postmessage separately without unifying it and it stopped giving me the error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With