doAction( "focus_area", area );
doAction( "focus_area_{key}", area );
Fires, after an area received the “focus” state.
If the page contains multiple Popups, only one Popup can have the “focus” state at any moment.
The dynamic part of the filter name is the sanitized Area key. See DiviAreaItem.theKey()
for details.
Params
area
- The Area which will be focused.
Examples
// Add a special CSS class to the focused Area.
DiviArea.addAction( 'focus_area', function( area ) {
area.addClass( 'special-focus' );
});
Notes
During the “focus” process, all event handlers are attached to the Area – like custom close buttons handlers. When the focus_area
event is fired, the Area is fully prepared with all event handlers in place.