doAction( “init_overlay” )

doAction( "init_overlay", $overlay );

Allows custom initialization of the background overlay.


$overlay jQuery, required
The jQuery object of the overlay element.


// Apply a custom class to the overlay div.
DiviArea.addAction( 'init_overlay', function( overlay ){
    overlay.addClass( 'my-class' );


Unlike show_overlay, this action is only fired once per page load (right before the first time a Popup is displayed). The overlay is persistent.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Get in touch with us