Closed jackharding closed 6 years ago
Sure, you can bind to slick directly. See https://github.com/mreq/slick-lightbox#lightbox-instance
can somebody please state an example of how to use afterChange and beforeChange with this plugin?I am not able to understand how to use the slick instance.Please can someone help me out with what this states console.log('My slick instance:', $('#my-element')[0].slickLightbox.slick) ?
You don't need the instance for that. Also, please, ask support questions on StackOverflow or similiar, not in GH issues.
Anyways:
$(document).on('beforeChange', '.slick-lightbox .slick-slider', function(event, slick, currentSlide, nextSlide){
console.log(nextSlide);
})
Thank you so much!And yes,I will use stack next time.Sorry. It is just that currently I am using the forked version - the one which has added video support .And I need to use the beforeChange and afterChange events for the same. https://github.com/mreq/slick-lightbox/issues/11
So ,Can I use the events for the forked version too in the same way as you stated?Thanks.
Hey. Love this plugin. Is there any way I can access beforeChange and afterChange events using this plugin?