doAction( "init_overlay" )

doAction( "init_overlay", $overlay );

Allows custom initialization of the background 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.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.