DiviAreaItem.isType(expected)
Tests, whether the current area matches the given area type.
Expected Type can be either:
""
/false
- matches all areas
"any"
/"all"
- matches all areas
"<area-type>"
- matches that area type
"not: <area-type>"
- matches all areas except that type
"<area-type1>, <area-type2>"
- matches all areas of type1 or type2
"not: <area-type1>, <area-type2>"
- matches all areas except type1 or type2
Params
expected
- Describes the type to expect for a
true
return value.
Returns
Boolean true
when the current area-type matches the given type.
Examples
var area = DiviArea.getArea();
if ( area.isType( 'popup' ) ) {
// The Area is a Popup.
}
if ( area.isType( 'not: inline, hover' ) ) {
// The Area is neither a Hover-Area, nor an Inline-Area.
}
Notes
No notes