I am trying to make a slider using flexsider but it is not loading on production. It is working well on development. I am getting this error:
Uncaught TypeError: $(...).flexslider is not a function
Here is the link to website: https://mybagicha.herokuapp.com/
jQuery(window).load(function(){
$('.flexslider').flexslider({
animation: "fade",
slideshowSpeed: 4000,
animationSpeed: 600,
controlNav: false,
directionNav: true,
controlsContainer: ".flex-container" // the container that holds the flexslider
});
});
That means jQuery
is not defined. If you load jQuery
twice that's also happened the error, try figure out that.
And try to the following added $
to the
jQuery(window).load(function($) {
$('.flexslider').flexslider({
//Code here
});
});
Hope to help
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.