Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: $(...).slick is not a function #10

Open
shaw64489 opened this issue Mar 19, 2019 · 0 comments
Open

Uncaught TypeError: $(...).slick is not a function #10

shaw64489 opened this issue Mar 19, 2019 · 0 comments

Comments

@shaw64489
Copy link

Hi,

I've added slick-carousel to the Vendor Libs:

const VENDOR_LIBS = [ 'slick-carousel', 'babel-polyfill', 'redux', 'react-redux', 'react-dom' ]

And initialized in my script.js file:

entry: { regularJS: './assets/js/regularJS.js', vendor: VENDOR_LIBS, script: './assets/js/script.js', },

Here is where its initialized in that script file:

`webpackJsonp([1],{

/***/ 240:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


$(document).ready(function () {
  // Init slick slider + animation
  $('.hero-fade').slick({
    autoplay: true,
    speed: 800,
    lazyLoad: 'progressive',
    // /arrows: false,
    dots: false,
    prevArrow: '<button class="slide-arrow prev-arrow"><i class="fal fa-angle-left"></i></button>',
    nextArrow: '<button class="slide-arrow next-arrow"><i class="fal fa-angle-right"></i></button>',
    responsive: [{
      breakpoint: 768,
      settings: {
        arrows: false,
        dots: true
      }
    }]
  }).slickAnimation();`

I keep getting the error:
Uncaught TypeError: $(...).slick is not a function

But I have Jquery added at the top of my index.html file:

<script
      src="http://code.jquery.com/jquery-3.3.1.min.js"
      integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
      crossorigin="anonymous"
    ></script>

And the vendor and script files added before body end:

<script type="text/javascript" src="/js/components/vendor.js"></script>

    <script type="text/javascript" src="/js/components/regularJS.js"></script>
    
    <script type="text/javascript" src="/js/components/script.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant