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.
Params
-
area
- (DiviAreaItem, required) The Area object.
Examples
// 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 ); } });
Notes
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.