Skip to main content
100%

if isMobile

✓ Published0🌍 Public
LLayne Smith
Last edited May 7, 2015
Created on May 7, 2015

This example demonstrates a simple branching interaction that checks whether a user is on a touch-enabled device. It shows a plain JavaScript conditional statement that executes one block of code if `isMobile` evaluates to true, and a different block otherwise. The code relies on the `ontouchstart` and `onmsgesturechange` window properties to detect touch capability, assigning the result to a variable. No visualization libraries or data sources are used; the example is purely a logic skeleton for responsive behavior.

AI-generated description

Similar vizzes