DiviArea.markClosed()
DiviArea.markClosed(key, closeFor)
Mark an area as "closed" for a certain number of minutes.
Params
-
key
- (string, required) ID/Key of the area. When no Area with the given ID exists on the current page, the key-string is treated like it is the final Area ID (see sample below).
-
closeFor
- (int, required) Number of minutes to close the are for.
Returns
The function does not return anything.
Examples
// Assume that the page contains the Area "#divi-area-test" DiviArea.markClosed('#divi-area-test', 15); // --> The localStorage entry "_da_divi-area-test" is created. // This happens, when the key is no valid Area ID: DiviArea.markClosed('Spaces In Key', 60); // --> The localStorage entry "_da_Spaces In Key" is created.
Notes
To check, if an Area is marked as closed, use the function DiviArea.isClosed(key)
and provide the same key string.