# Hide on Desktop Show on Mobile

**URL:** <https://forum.wixstudio.com/t/hide-on-desktop-show-on-mobile/2771>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [August 9, 2018, 5:48pm UTC](https://forum.wixstudio.com/t/hide-on-desktop-show-on-mobile/2771 "2018-08-09T17:48:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![myerfreimann](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@myerfreimann](https://forum.wixstudio.com/u/myerfreimann)\
**Post date:** [August 9, 2018, 5:48pm UTC](https://forum.wixstudio.com/t/hide-on-desktop-show-on-mobile/2771/1 "2018-08-09T17:48:38Z")

</div>

Hi, I’ve followed the instructions on the help page to implement this but I can’t get it to work. Please help. The website is [texasisrael.org/honoring-att](http://texasisrael.org/honoring-att)  
The two videos at the bottom should be hidden on mobile (working). But in their place should be two Gifs that are shown on mobile (not working) and hidden on desktop (working).

---

<div class="post-metadata">

**Author:** ![tiaan](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/tiaan/32/896_2.png) [@tiaan](https://forum.wixstudio.com/u/tiaan)\
**Post date:** [August 9, 2018, 6:05pm UTC](https://forum.wixstudio.com/t/hide-on-desktop-show-on-mobile/2771/2 "2018-08-09T18:05:40Z")

</div>

@myerfreimann

Try this:

```javascript
import wixWindow from 'wix-window';

$w.onReady(function () {
let formFactor = wixWindow.formFactor; 
if (formFactor === "Mobile"){
    <show mobile only elements>
    }else{
    <show desktop only elements>
    }
})

```

Tiaan

---

<div class="post-metadata">

**Author:** ![myerfreimann](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@myerfreimann](https://forum.wixstudio.com/u/myerfreimann)\
**Post date:** [August 9, 2018, 6:31pm UTC](https://forum.wixstudio.com/t/hide-on-desktop-show-on-mobile/2771/3 "2018-08-09T18:31:27Z")

</div>

That doesn’t work

---

<div class="post-metadata">

**Author:** ![tiaan](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/tiaan/32/896_2.png) [@tiaan](https://forum.wixstudio.com/u/tiaan)\
**Post date:** [August 9, 2018, 6:41pm UTC](https://forum.wixstudio.com/t/hide-on-desktop-show-on-mobile/2771/4 "2018-08-09T18:41:38Z")

</div>

@myerfreimann

Please share the code you’ve built

---

<div class="post-metadata">

**Author:** ![myerfreimann](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@myerfreimann](https://forum.wixstudio.com/u/myerfreimann)\
**Post date:** [August 9, 2018, 8:53pm UTC](https://forum.wixstudio.com/t/hide-on-desktop-show-on-mobile/2771/5 "2018-08-09T20:53:31Z")

</div>

sure, first I tried the instructions here: [Velo Tutorial: Displaying Elements in Mobile Only | Help Center | Wix.com](https://support.wix.com/en/article/how-to-use-wix-code-to-display-elements-in-mobile-only)

and the code looked like this:

$w.onReady(function () {  
if(wixWindow.formFactor === “Mobile”){  
$w(“#image9”).show();  
$w(“#image10”).show();  
}  
})  
;

I set “hidden on load” in element properties. This approach didn’t work so I tried what a Mix rep in the forum suggested and the code looked like this:

import wixWindow from ‘wix-window’;

$w.onReady(function () {  
if (wixWindow.formFactor === “Desktop”) {  
$w(“#image9”).hide();  
$w(“#image10”).hide();  
} else {  
$w(“#image9”).show();  
$w(“#image10”).show();  
}  
})  
;

But it still doesn’t work. Appreciate any help.

---

<div class="post-metadata">

**Author:** ![roi-bendet](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/roi-bendet/32/1283_2.png) [@roi-bendet](https://forum.wixstudio.com/u/roi-bendet)\
**Post date:** [August 13, 2018, 12:45pm UTC](https://forum.wixstudio.com/t/hide-on-desktop-show-on-mobile/2771/6 "2018-08-13T12:45:02Z")

</div>

Hi, You code looks ok.  
My guess that image9 and image10 are disabled in the mobile editor.  
Can you please share a link to your site and specify the name of the so we can inspect?  
Roi.

---

<div class="post-metadata">

**Author:** ![myerfreimann](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@myerfreimann](https://forum.wixstudio.com/u/myerfreimann)\
**Post date:** [August 13, 2018, 4:44pm UTC](https://forum.wixstudio.com/t/hide-on-desktop-show-on-mobile/2771/7 "2018-08-13T16:44:00Z")

</div>

main site is [https://www.texasisrael.org](https://www.texasisrael.org) and the page I’m having issues with is [https://www.texasisrael.org/honoring-att](https://www.texasisrael.org/honoring-att)
