Slick Carousel: http://kenwheeler.github.io/slick/
How can I get the element of the slide in an event? For example:
.on('afterChange', function (slick, currentSlide)
{
var currentSlideElement = //Get current slide element here
});
The first argument seems to be the event
object, but its target
(or currentTarget
) is always the slides container, and second argument seems to be the slick object....
you need to include the first argument "event" like this
$('.your-element').on('afterChange', function(event, slick, currentSlide){
console.log(currentSlide);
});
or else your "currentSlide" argument will be "slick"