DiviArea.hide()

  1. Home
  2. Knowledge Base
  3. Codex
  4. JS API
  5. JS Functions
  6. DiviArea.hide()
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
(string|jQuery|DiviAreaItem, optional) 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().

Was this article helpful?

Related Articles