doAction( "refresh_area" )

doAction( "refresh_area", area );
doAction( "refresh_area_{key}", area );

Fires after options were applied to the area DOM elements.

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

Params

area
(DiviAreaItem, required) The updated Area object.

Examples

// Add a custom class to the area wrapper.
DiviArea.addAction( 'refesh_area', function( area ) {
    if ( area.getData( 'custom-value' ) ) {
        area.addClass( 'custom-class' );
    } else {
        area.removeClass( 'custom-class' );
    }
});

Notes

This action will be called with a slight delay (about 20 milliseconds) after calling area.setData().

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.