简体   繁体   中英

Slick layout doesn't work after update the content in a section

Hi guys I've got some problems with slik code After a button click, the layout in the slider no longer works and I don't know why, I guess I have to recall this function:

$(".regular").slick({
        dots: true,
        infinite: true,
        slidesToShow: 3,
        slidesToScroll: 3
      });

But I'm not sure and I don't know where to call it.

Some ideas?

Thanks

Denis

You need to unslick before you add any content to it,

then init it again

  $(".regular").slick("unslick");
  $(".regular").slick({
        dots: true,
        infinite: true,
        slidesToShow: 3,
        slidesToScroll: 3
        //attr you need
      });

Hope that 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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM