Device depending display of different zoom options

Depending on the setup, sometimes it is required for different types of zoom depending on the available screen dimensions,
e.g. you prefer to use FSI QuickZoom on desktop devices, but would like to use FSI Viewer JS on mobile devices to present
a satisfying zoom experience to the user.

View Sample

The following code snippet demonstrates how to achieve the given setup:

Here we create an <fsi-viewer> tag when the webpage is visited by a mobile device or a normal <image> tag otherwise.
The created tag is appended to a <DIV> which will hold the image or FSI Viewer JS somewhere in your HTML:

After the tag has been appended, the preferred zoom feature from FSI gets activated. Please see the working sample.

If you like to target touch devices in general, instead of checking for

you can also check for

this will also create an FSI Viewer JS on touch enabled desktop monitors. A working sample for the isTouch can be found here.

Posted in: