doAction( “hide_area” )

  1. Home
  2. Knowledge Base
  3. Codex
  4. JS API
  5. JS Actions
  6. doAction( “hide_area” )
doAction( "hide_area", area );
doAction( "hide_area_{key}", area );

Fires, once a previously visible Area is hidden again.

The dynamic part of the filter name is the sanitized Area key. See DiviAreaItem.theKey() for details.


(DiviAreaItem, required) The Area object.


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

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


The hide_area action fires after the blur_area, when the “clean-up” process has finished: All event handlers were removed from the Area and it was detached from the DOM tree.

Was this article helpful?

Related Articles