I checked the documentation on callbacks here: https://layerslider.kreaturamedia.com/documentation/ but it says that I should use the events on the sitebuilder. (Which I cannot access since I have the jQuery version of the plugin). I only want an example on how should I use callbacks on the jQuery version.
Yes, there is indeed a mixup in the current version's documentation, but we have just released a new update (currently waiting for Envato's approval) that will also fix this.
We are relying on jQuery's event handling functions, so they are fully compatible. You should use the .on() function for bind events.
// Binding event
$('#slider').on('slideChangeDidStart', function(event, slider) {
// Your code ...
});
// Initializing the slider
$('#slider').layerSlider({
// Your settings ...
});
I checked the documentation on callbacks here: https://layerslider.kreaturamedia.com/documentation/ but it says that I should use the events on the sitebuilder. (Which I cannot access since I have the jQuery version of the plugin). I only want an example on how should I use callbacks on the jQuery version.
I’ve been trying stuff like this with no sucess:
Any help would be appreciated.
Hey gonzaloandrade,
Yes, there is indeed a mixup in the current version's documentation, but we have just released a new update (currently waiting for Envato's approval) that will also fix this.
We are relying on jQuery's event handling functions, so they are fully compatible. You should use the .on() function for bind events.
Thanks!!