doAction( “show_area” )

  1. Home
  2. Knowledge Base
  3. Codex
  4. JS API
  5. JS Actions
  6. doAction( “show_area” )
DiviArea.doAction( 'show_area', area );
DiviArea.doAction( 'show_area_{id}', area );

Fires, once the Area is visible or the intro-animation has started.

The {id} part in the hook name is the sanitized area-ID (all lower case, dashes changed to underscores).


(DiviAreaItem) The Area object.


// Send an event to google analytics, once a Popup is displayed.
DiviArea.addAction( 'show_area', function( area ) {
    var type = area.getType();
    var key = area.getKey();

    if ( 'popup' === type ) {
        ga( 'send', 'event', 'Popup', 'open', key );


No notes.

Was this article helpful?

Related Articles