How can i change prev/next slick buttons action. I have a dynamically loadable carousel. So i need to add an image load action to buttons.
I tried to add action to slick declaration block like
$(".mySlickCarousel").slick({
prevArrow: function () {
// code
}
})
tried this too:
$('.your-element .next-button').click(function(event){
//load image
});
It doesn't work too. Well the browser get into the function only once. For a first time. Then ignoring
UPD: So, i solved it. As one guy told previously, you need to describe your own buttons
prevArrow: $ ('.prev'),
nextArrow: $ ('.next'),
and then do that
$(".next").on("click", function() {
//your code
});
it's worked!