The object does not have a flexslider method

I am trying to configure "flexslider" on my website.

So, I use this jQuery to load a function and apparently it does not load.

$(window).load(function() { $('.flexslider').flexslider({ animation: "slides", animationLoop: false, itemWidth: 100, itemMargin: 5 }); }); 

But I get this errormessage when I look in the console:

 Uncaught TypeError: Object [object Object] has no method 'flexslider' 

If the website can come to the rescue: http://nworks.nu/projects2013/sthlm/index.html

+2
source share
3 answers

There are basically two reasons for this error.

  • Or you did not include the required plugin.
  • You have included jQuery twice.

You do the second thing, including jQuery twice.

jQuery 1.6.2 at the top (before flexslider js) and jQuery 1.9.1 at the bottom (right before </body> )

Please correct this and the error will disappear.

ps Use $(document).ready() instead of $(window).load() and do not use frames

+4
source

I had the same problem on the site that I am editing, but, oddly enough, only one version of jQuery was called, but it was:

 jQuery.noConflict(); 

Make sure nothing happens to you.

0
source

I had this error and it was the wrong path to the flexslider.js file. In the console, an error was followed by a get call to the flexslider.js file. By clicking on this, go to the network tab, which shows that the file was not received.

0
source

Source: https://habr.com/ru/post/1496163/


All Articles