DiviArea.Utils.showOnViewport()

DiviArea.Utils.showOnViewport(area)

Checks the viewport configuration of the Area agains the current viewport. Only the window-width is tested to determine whether the Area should be displayed or not.

If the parameter is a DiviAreaItem, the area.getData("onDEVICE") flags are used to determine the visibility state per device. When the parameter is an array, it is supposed to have 3 boolean items: [onDesktop, onTablet, onPhone]

Params

area
(DiviAreaItem|array, required) The Area, or viewport configuration to test.
The configuration array needs three elemens [onDesktop, onTablet, onMobile]

Returns

Returns true when the Area should be displayed on the current viewport.

Notes

No notes

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.