Error executing a JS function

Asked

Viewed 33 times

0

I’m trying to perform this function:

function createSlick(){  

    $(".slider").not('.slick-initialized').slick({
        centerMode: true,
        autoplay: true,
        dots: true,

        slidesToShow: 4,
        responsive: [{ 
            breakpoint: 768,
            settings: {
                dots: false,
                arrows: false,
                infinite: false,
                slidesToShow: 1,
                slidesToScroll: 1
            } 
        }]
    }); 
}

createSlick();

But you’re making this mistake:

Uncaught Typeerror: $(...). not(...). Slick is not a Function

Could someone help me solve?

  • 1

    Probably the plugin library was not loaded.

  • You imported the jquery?

  • I’m calling here: <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" Integrity="sha384-Kj3o2dktikvyik3uenzmm7kckrr/rE9/Qpg6aazgjwfdmvna/Gpgff93hxpg5kkn" crossorigin="Anonymous"></script> <script type="text/javascript" src="js/products.js"><<script/type script type>

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.