Run Script after slick slider loads
<p>I want to add class on body tag after the slick slider loads and after one of the slider has class .class-slide.</p>

<p>HTML</p>

<pre><code> &lt;div class="slider"&gt;
  &lt;div class="slide"&gt;
    1
  &lt;/div&gt;
  &lt;div class="slide"&gt;
    2
  &lt;/div&gt;
  &lt;div class="slide class-slide"&gt;
    3
  &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>So after the slick has loaded and if the slide with class .class-slide is active then i need a demo class on tag.</p>

<p>I tried this</p>

<pre><code>jQuery(function () {
 if(jQuery(".class-slide").hasClass("slick-active")){
   jQuery(body).addClass('body-class');
 }
</code></pre>

<p>but since the DOM is already loaded this wont work . How can we fix this ?</p>

<p><a href="http://codepen.io/sabipu/pen/GjJGAq" rel="nofollow">Link to Codepen</a></p>