Back

No Background Scroll

This example demonstrates how to disable background scrolling when the lightbox is open.

Scroll down to see the image...

Click the image below

Nature

While the lightbox is open, you won't be able to scroll this page.

Extra content to enable scrolling...
By default, allowBackgroundScrolling is set to false, which prevents scrolling the background page while the lightbox is active.
Picture by Pexels THANK YOU!

Source of exampleCopy to clipboard


new AvalynxLightbox('.avalynx-lightbox', {
    allowBackgroundScrolling: false
});
	
AvalynxLightbox on GitHub Avalynx on GitHub