title: Using variable in jQuery Slick slideshow to set initial slide doesn't work
body: <p>I'm using a slideshow on my website using <a href="http://kenwheeler.github.io/slick/" rel="nofollow noreferrer">jQuery Slick</a>.</p>
  
  <p>My slideshow is hidden when page is loaded, and I have some thumbnails to click on to open my slideshow.<br />
  Each thumbnail has a data-number attribute (my variable), and when clicking on a thumbnail, my slideshow opens itself, and the initial slide should be set depending on which thumbnails has been clicked.</p>
  
  <p>Here is my code without the variable. I choose thumb 4 just for the example, and it works fine :</p>
  
  <pre><code>$(".thumb").click(function(){
    $(".slider").show();
    setTimeout(function(){
      $('.slider').slick({
        slidesToShow: 4,
        slidesToScroll: 1,
        centerMode: true,   
        initialSlide : 4,
        infinite: true,
        prevArrow : $('.prev'),
        nextArrow : $('.next')});
      $(".slider").css("opacity", 1);
    }, 2000);
  });
  </code></pre>
  
  <p>You can see it working on <a href="https://jsfiddle.net/fmo50w7n/1118/" rel="nofollow noreferrer">this jsFiddle</a>.</p>
  
  <p>Now, when I try to put a variable in my code for the initialSlide, the initial slide is ok, but when I click on "next", my slideshow disappear or is not working properly...<br />
  try for example thumb 7... </p>
  
  <p>Here is my code :</p>
  
  <pre><code>$(".thumb").click(function(){
    var initialslide = $(this).attr("data-number");
    $(".slider").show();
    setTimeout(function(){
      $('.slider').slick({
        slidesToShow: 4,
        slidesToScroll: 1,
        centerMode: true,   
        initialSlide : initialslide,
        infinite: true,
        prevArrow : $('.prev'),
        nextArrow : $('.next')});
      $(".slider").css("opacity", 1);
    }, 200);
  });
  </code></pre>
  
  <p>See this <a href="https://jsfiddle.net/fmo50w7n/1115/" rel="nofollow noreferrer">jsFiddle</a> to see it in action : if you click on <em>next</em> after the slideshow appears, you'll see the problem.</p>
  
  <p>I don't know what I'm doing wrong, can anybody help me with this ?</p>
  
  <p>Thanks</p>