javascriptjqueryfancybox

Uncaught TypeError: Object [object Object] has no method "fancybox"


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://salomonsuperpark.pl/ 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 :)


Solution

  • There are couple of issues in your website.

    1. You are including jQuery library 2 times one before and after including fancybox plugin js because of which the plugin which is added is cleared by second jQuery library inclusion.
    2. There is some other library which is overridding $, 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 $.