DiviArea.Data.getVisibleArea(id, type)

Returns either the top-most visible Area, or the Area with the given ID.


id string, optional
The Area ID to fetch; empty for the top most entry.
type string, optional
The Area type to filter for – the function returns the top-most visible area of the given type.
Default: all


Returns the DiviAreaItem object that matches the id and type parameters. If no such visible Area was found, the function returns false.


// Get the top-most visible Area of any type.

// Get the top-most visible Fly-In.
DiviArea.Data.getVisibleArea('', 'flyin');

// Check, if the Area `#sample' is visible.
if ( DiviArea.Data.getVisibleArea('#sample') ) {
  console.log('Sample Area is visible');


No notes

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Get in touch with us