Skip to content

Instantly share code, notes, and snippets.

View brianimmel's full-sized avatar

Brian Immel brianimmel

View GitHub Profile
@brianimmel
brianimmel / lity-background-scroll-stop.js
Created February 15, 2018 06:40
Add to page to prevent background from scrolling with an active lity modal
$(document).ready(function() {
$(document).on("lity:open", function() {
// update body to stop scrolling
$('body').css('overflow', 'hidden');
});
$(document).on("lity:close", function() {
$('body').css('overflow', 'visible');
});
});