setBackgroundScroll( )


Sets whether the site in the background behind a lightbox can be scrolled while a lightbox overlay is open.

If backgroundScrollEnabled is true, site visitors can scroll the site in the background behind a lightbox while a lightbox overlay is open.

If backgroundScrollEnabled is false, site visitors can't scroll the site in the background behind a lightbox while a lightbox overlay is open.

The default for backgroundScrollEnabled is false.

Notes:

  • This method only affects the site in the background behind a lightbox. It doesn't affect the scrollability of the lightbox content itself.
  • While the editor and dashboard now refer to these elements as popups, the API methods and documentation continue to use the term lightbox for consistency and backward compatibility.
Method Declaration
Copy
Method Parameters
backgroundScrollEnabledboolean

Whether site visitors can scroll the site in the background behind a lightbox while a lightbox overlay is open.

Default: false

Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?