setBackgroundScroll( )


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

Note: The terms popup and lightbox refer to the same element. While the editor and dashboard now refer to it as a popup, the API methods continue to use the term lightbox for backward compatibility. The documentation uses both terms accordingly.

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

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

The default for backgroundScrollEnabled is false.

Note: This method only affects the site in the background behind a popup. It doesn't affect the scrollability of the popup content itself.

Method Declaration
Copy
Method Parameters
backgroundScrollEnabledboolean

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

Default: false

Did this help?