title: unslick method not working
body: <p>I am trying to work out why the unslick method isn't working when I am calling it after a successful ajax call. I have read <a href="https://stackoverflow.com/questions/27276119/slickjs-unslick-remove-issue">this</a> post and am looking for the <code>slick-initialized</code> class, but I am still getting the error</p>
  
  <blockquote>
    <p>TypeError: <em>.$slides is null if (</em>.$slides.parent().hasClass('slick-track'))</p>
  </blockquote>
  
  <p>HTML</p>
  
  <pre><code>&lt;div id="skills" class="skills_section"&gt;
    &lt;div&gt;Slide 1&lt;/div&gt;
    &lt;div&gt;Slide 2&lt;/div&gt;
    &lt;div&gt;Slide 3&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>When I initialize slick on page load the markup will look like this:</p>
  
  <pre><code>&lt;div id="skills" class="skills_section slick-initialized slick-slider"&gt;
    &lt;div class="slick-list draggable"&gt;
      &lt;div class="slick-track"&gt;
        &lt;div class="slick-slide slick-cloned"&gt;Slide 1&lt;/div&gt;
        &lt;div class="slick-slide slick-cloned"&gt;Slide 2&lt;/div&gt;
        &lt;div class="slick-slide slick-cloned"&gt;Slide 3&lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>I have an ajax call that will just replace the data in each <code>slick-slide</code></p>
  
  <pre><code>$.ajax({
    type: 'get',
    url: '/public/index',
    dataType: 'script',
    data: data_send,
     success: function(data) {
       unSlickCarousel();
       slickCarousel();
     }
  });
  </code></pre>
  
  <p>Functions</p>
  
  <pre><code>function slickCarousel() {
    $('.skills_section').slick({
      infinite: true,
      slidesToShow: 3,
      slidesToScroll: 1
    });
  }
  
  function unSlickCarousel() {
    if($('#skills').hasClass('slick-initialized')){
      $('.skills_section').unslick();
    }
  }
  </code></pre>
  
  <p>But as I have mentioned I get the error and the HTML markup looks like this</p>
  
  <pre><code>&lt;div id="skills" class="skills_section slick-initialized slick-slider"&gt;
    &lt;div&gt;Slide 1&lt;/div&gt;
    &lt;div&gt;Slide 2&lt;/div&gt;
    &lt;div&gt;Slide 3&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>