title: Getting data-attributes from slides in slick carousel
body: <p>After the 1.4 update to Slick carousel, the method to pull data attributes from the current slide changed. </p>
  
  <p>The previous method which worked: </p>
  
  <pre><code>onAfterChange: function(slide, index) {
     $('.project-caption').find('p').replaceWith("&lt;p&gt;" + $(slide.$slides.get(index)).data('description') + "&lt;/p&gt;");
  }
  </code></pre>
  
  <p>Now the documentation says to call current slide after change like this:</p>
  
  <pre><code>$('.your-element').on('afterChange', function(event, slick, currentSlide, nextSlide){
      console.log(nextSlide);
  });`
  </code></pre>
  
  <p>I've tried everything I know to get the data attribute using the new method.</p>
  
  <p>Author show me how to get the current Slide as an integer here: <a href="http://jsfiddle.net/3b4kqy9p/" rel="nofollow">http://jsfiddle.net/3b4kqy9p/</a></p>
  
  <p>But does anyone know how to get the current slide data-attributes?</p>