DiviArea.configArea()

  1. Home
  2. Knowledge Base
  3. Codex
  4. JS API
  5. JS Functions
  6. DiviArea.configArea()
DiviArea.configArea(area, attrib, value)

This method is deprecated. Please use DiviAreaItem.setData() instead.

Params

no Params

Returns

The function does not return anything.

Examples

// The "#" prefix is optional. Following statements are identical:
DiviArea.config('sample', 'show-close', true);
DiviArea.config('#sample', 'show-close', true);
// For boolean attributes, the third parameter is optional.
DiviArea.config('#sample', 'show-close');
DiviArea.config('#sample', 'show-close', true); // Same as above.

// Boolean attributes can be removed by passing in the value `false` or by
// setting the negated attribute.
DiviArea.config('#sample', 'show-close', false); // This removes the close button.
DiviArea.config('#sample', 'hide-close', true); // Also removes the close button.
// Example of configuring the Area via an object.
DiviArea.config('#sample', {
    'show-close': true,
    'trigger-exit': true,
    'close-alt': true
});

Notes

A list of all supported configuration options is documented in the DiviAreaItem.setData() function.

Was this article helpful?

Related Articles