doAction( “init_overlay” )

  1. Home
  2. Knowledge Base
  3. Codex
  4. JS API
  5. JS Actions
  6. doAction( “init_overlay” )
doAction( "init_overlay", $overlay );

Allows custom initialization of the background overlay.

Params

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

Examples

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

Notes

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