Hello
I want to toggle a class, if lightgallery opens. They provide this code:
var $lg = $('#lightgallery');
$lg.lightGallery();
// Perform any action just before opening the gallery
$lg.on('onBeforeOpen.lg',function(event){
alert('onBeforeOpen');
});
// custom event with extra parameters
// index - index of the slide
// fromTouch - true if slide function called via touch event or mouse drag
// fromThumb - true if slide function called via thumbnail click
$lg.on('onBeforeSlide.lg',function(event, index, fromTouch, fromThumb){
console.log(index, fromTouch, fromThumb);
});
I have this js to toggle my classes by click:
$(function() {
$("#kuenstler").click(function(){
$("body").toggleClass("scrolled-down-20"); }).scroll();
});
Now I want to combine these 2 that my classes are toggled by opening the gallery.
Thanks for help.
snote