DiviArea.Data.loopVisibleAreas()

  1. Home
  2. Knowledge Base
  3. Codex
  4. JS API
  5. JS Functions
  6. DiviArea.Data.loopVisibleAreas()
DiviArea.Data.loopVisibleAreas(filter, callback, reversed)

Loop all visible Areas of the given type and execute the callback for them.

Params

filter
(string, optional) The area type, e.g. popup, inline, flyin, hover.
Default: all
callback
(callable, required) The callback function to execute.
reversed
(bool, required) Whether to loop Areas in reverse order.

Returns

The function does not return anything.

Examples

// Display a list of all visible Areas in the JS console.
DiviArea.Data.loopVisibleAreas('all', function(area) {
  console.log('Visible Area found:', area.theId());
});

Notes

No notes

Was this article helpful?

Related Articles