woocommerce / FlexSlider

An awesome, fully responsive jQuery slider plugin
http://www.woocommerce.com/flexslider/
GNU General Public License v2.0
4.91k stars 1.69k forks source link

Problems running the carousel function. #1738

Closed meugamer closed 2 months ago

meugamer commented 6 years ago

Hello everyone. I love flexslider. I currently use flexslider along with swipebox. But I always use the function below for the carousel. The console has many javascript errors. But by removing the code, the errors disappear. Could anyone guide what would be the eminent solution for this?

var $f = jQuery.noConflict(true);
    $f(window).load(function() {
      // The slider being synced must be initialized first
      $f('#carousel').flexslider({
        animation: "slide",
        controlNav: false,
        animationLoop: false,
        slideshow: false,
        itemWidth: 180,
        itemMargin: 5,
        asNavFor: '#slider'
      });

  //    this error 
      $f('#slider').flexslider({
        animation: "slide",
        controlNav: false,
        animationLoop: false,
        slideshow: false,
        sync: "#carousel"
      });
    });

//

In console ///

photon.min.js?ver=20130122:3 Uncaught TypeError: t is not a function at photon.min.js?ver=20130122:3 at photon.min.js?ver=20130122:3 (anonymous) @ photon.min.js?ver=20130122:3 (anonymous) @ photon.min.js?ver=20130122:3 wpmoly.js?ver=2.1.4.7:8 Uncaught TypeError: $ is not a function at Object.wpmoly.init (wpmoly.js?ver=2.1.4.7:8) at wpmoly.js?ver=2.1.4.7:76 at wpmoly.js?ver=2.1.4.7:78 wpmoly.init @ wpmoly.js?ver=2.1.4.7:8 (anonymous) @ wpmoly.js?ver=2.1.4.7:76 (anonymous) @ wpmoly.js?ver=2.1.4.7:78 bootstrap.min.js?ver=4.9.8:6 Uncaught TypeError: Cannot read property 'fn' of undefined at bootstrap.min.js?ver=4.9.8:6 at bootstrap.min.js?ver=4.9.8:6 at bootstrap.min.js?ver=4.9.8:6 at bootstrap.min.js?ver=4.9.8:6 (anonymous) @ bootstrap.min.js?ver=4.9.8:6 (anonymous) @ bootstrap.min.js?ver=4.9.8:6 (anonymous) @ bootstrap.min.js?ver=4.9.8:6 (anonymous) @ bootstrap.min.js?ver=4.9.8:6 navigation.js?ver=20120206:6 Uncaught TypeError: jQuery is not a function at navigation.js?ver=20120206:6 (anonymous) @ navigation.js?ver=20120206:6 jquery.flexslider-min.js?ver=4.9.8:5 Uncaught TypeError: Cannot set property 'flexslider' of undefined at jquery.flexslider-min.js?ver=4.9.8:5 at jquery.flexslider-min.js?ver=4.9.8:5 (anonymous) @ jquery.flexslider-min.js?ver=4.9.8:5 (anonymous) @ jquery.flexslider-min.js?ver=4.9.8:5 awaken.slider.js?ver=4.9.8:1 Uncaught TypeError: jQuery is not a function at awaken.slider.js?ver=4.9.8:1 (anonymous) @ awaken.slider.js?ver=4.9.8:1 eu-cookie-law.min.js?ver=20180522:2 Uncaught TypeError: e is not a function at eu-cookie-law.min.js?ver=20180522:2 at eu-cookie-law.min.js?ver=20180522:2 (anonymous) @ eu-cookie-law.min.js?ver=20180522:2 (anonymous) @ eu-cookie-law.min.js?ver=20180522:2 lazy-images.min.js?ver=6.5:3 Uncaught TypeError: t is not a function at jetpackLazyImagesModule (lazy-images.min.js?ver=6.5:3) at lazy-images.min.js?ver=6.5:16 jetpackLazyImagesModule @ lazy-images.min.js?ver=6.5:3 (anonymous) @ lazy-images.min.js?ver=6.5:16 analyticsjs.js?ver=4.9.8:1 Uncaught TypeError: jQuery is not a function at analyticsjs.js?ver=4.9.8:1 (anonymous) @ analyticsjs.js?ver=4.9.8:1 scripts.js?ver=4.9.8:2 Uncaught TypeError: jQuery is not a function at HTMLDocument. (scripts.js?ver=4.9.8:2) at i (jquery.js?ver=1.12.4:2) at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2) at Function.ready (jquery.js?ver=1.12.4:2) at HTMLDocument.K (jquery.js?ver=1.12.4:2)