简体   繁体   中英

Hide first slide on Slick Slider

I'm trying to hide first slide (a bit of a hack for something) of my slick slider. And got no luck at all so far. Here is my html code for it

<div class="slidewrap" >
     <div class="sitem" id="hidethisslide">
     </div>
     <div class="sitem">
     </div>
     <div class="sitem">
     </div>
</div>

And here is my jquery for it

$(document).ready(function(){
  $('.slidewrap').slick({
    slidesToShow: 1,
    slidesToScroll: 1,
    autoplay: false,
    autoplaySpeed: 3000,
    arrows:true
  });
$('.slidewrap').slick('slickRemove','#hidethisslide');
});

Slider works perfectly fine, and there are no errors in the console. But first slide is still there.

Thanks in advance.

Change

$('.upsellwrap').slick('slickRemove','#hidethisslide');

to

$('.slidewrap').slick('slickRemove',0);

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