DiviArea.hide(area)
Closes the specified Area. When the Area is not open, nothing happens.
Popup Areas:
Upon closing the last popup, the background overlay is removed as well by calling DiviArea.hideOverlay()
.
Params
area
- Identifies the Area to hide. Accepts a string with the Area ID (e.g.,
"#my-popup"
), the jQuery area (e.g.,jQuery("#my-popup")
), or an DiviAreaItem object (e.g.,DiviArea.getArea("#my-popup")
)
Default: The top-most visible Area
Returns
The function does not return anything.
Examples
// The "#" prefix is optional. Following statements are identical:
DiviArea.hide('sample');
DiviArea.hide('#sample');
// Close the top most area.
DiviArea.hide();
Notes
This function was previously named DiviPopup.closePopup()
.