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.

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:

XHTML

1

<div id="zoomImage"></div>

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

JavaScript

1

$FSI.isMobileDevice

you can also check for

JavaScript

1

$FSI.isTouch

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