Hide item if mobile (tablet) device

Is there a way to NOT have something animate on screen if the device is a tablet?
If Wix won’t allow video on mobile devices (they say it’s Apple’s data throttling but I know that Wordpress can show full-scree, non-Youtube/Vimeo videos on mobile devices so there must be a way around it.
I have an opening video on desktop and an animated logo that appear at the end but don’t want it on my mobile devices.
The video only shows the first frame on ipads and iphones, I can live with that if I can get rid of the script that animates on at the bottom of the page after 4 seconds.
OR can I have it detect the Tablet and have it go to a different page?
Thanks for any code or examples.

1 Like

You can hide elements on the mobile editor as explained here . However, there’s no option to check whether the device is a tablet or a mobile phone.


I have the image hidden in the Mobile Editor but it’s still showing up on my iPad which is, of course considered a ‘mobile device’.

Please contact Wix support team as they know best to help you with this matter. This forum is specialised on the Wix Code product.


The only way to do it is through WixCode, that’s why I’m asking for help here.
Can I test window size with WixCode and hide an image based on that?

After re-checking the API, I found something which can be useful:
You can check out the Wix-Window API. The getBoundingRect( ) function returns a Promise that resolves to an object containing information about the current window’s size , the document’s size, and the current scroll position. Based on that, you can hide / show elements. However, since there are different types of tablets with different types of screen sizes, you should think how to write the code so it works on various of devices.

Good luck,

1 Like

Why doesn’t Wix see Tablets as the mobile devices they are?
Can you offer some example of how to do what you mentioned?
The code is NOT working even on my iPhone (tried on Page and in the Site tab:

import wixWindow from ‘wix-window’;
import wixLocation from ‘wix-location’;

if (wixWindow.formFactor === ‘Mobile’) {
} else {


I do appreciate your help, this a VIP site if it make any difference.

Is there anything in WixCode that will force a video to play on iPads?

have the image hidden in the Mobile image gallery but still shown in gallery why ?? how can I hide this image in iphone6… if you have any idea please share with me on this link

As we see nowadays, people are using different types of the router for different types of work, it may be related to education, business etc. So people have to face different problem related to connectivity, speed etc. For more details visit https://babasupport.org/routers/xfinity-customer-service/639

Wix sites are compatible with iPads and tablets . However, there’s no option to check if the device is a tablet or not using code. The only option is, as mentioned above, checking if the device is mobile . Therefore, there’s no option to force a video to play on iPads.


Hey Tal,

Im testing a simple show() and hide() command over a video element in a wix page of my website. Both commands work fine in Android mobile phones but not in iPhones.

What can I do about this?