0

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.

1
  • where is .upsellwrap class in dom?
    – DenysM
    Commented Oct 30, 2017 at 23:23

1 Answer 1

1

Change

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

to

$('.slidewrap').slick('slickRemove',0);
1
  • 1
    @StackSlave Could you make the 'slickRemove' work with a number array? Or a range? This doesn't work but something like: $('.slidewrap').slick('slickRemove',[0,1]); or =>2 Commented May 13, 2019 at 16:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.