Flamingo.Device.isTablet()

The isTablet() method is used to detect if the user device is tablet or not. It returns TRUE if user device is detected as tablet and FALSE otherwise.

Syntax

Flamingo.Device.isTablet()

Parameters

None.

Return Value

Type Description
Boolean TRUE if user device is detected as tablet and FALSE otherwise.

Example

You can use the following code in template to display “IT’S A TABLET!” in case user opened a page on tablet and display “NOT A TABLET” otherwise:

<!--{if Flamingo.Device.isTablet() }-->
 IT'S A TABLET!
<!--{else}-->
 NOT A TABLET
<!--{/if}-->

If user opened page on iPad, the result will be:

IT'S A TABLET!

See also