adding class only if scrolled down
Hi!
I have my lightgallery opened and want before closing it
my class only to be added when the main page is scrolled down a bit.
$("#LGbest").on({
'onBeforeOpen.lg': function(event) {
$("body").removeClass("scrolled-down-top").addClass("scrolled-down-home");
console.log(event.name,event);
},
'onBeforeClose.lg': function(event) {
$("body").removeClass("scrolled-down-home");//add class if scrolled down .addClass("scrolled-down-top");
console.log(event.name,event);
}
})
snote