# Display elements in mobile only.

**URL:** <https://forum.wixstudio.com/t/display-elements-in-mobile-only/38535>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [June 7, 2018, 9:30am UTC](https://forum.wixstudio.com/t/display-elements-in-mobile-only/38535 "2018-06-07T09:30:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![omarsuriano](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/omarsuriano/32/4416_2.png) [@omarsuriano](https://forum.wixstudio.com/u/omarsuriano)\
**Post date:** [June 7, 2018, 9:30am UTC](https://forum.wixstudio.com/t/display-elements-in-mobile-only/38535/1 "2018-06-07T09:30:40Z")

</div>

Hi everyone.  
I followed this tutorial [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) to display a button in mobile only.

If in the properties panel “Hidden on load” is selected the button doesn’t appear neither in mobile nor in desktop.

If “Hidden on load” is deselected nothing happens neither in mobile nor in desktop.

I took a look to other post in the forum with similar issues but I didn’t find a solution.

Can someone help me?

Thanks

---

<div class="post-metadata">

**Author:** ![yisrael-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yisrael-wix/32/1107_2.png) [@yisrael-wix](https://forum.wixstudio.com/u/yisrael-wix)\
**Post date:** [June 7, 2018, 12:23pm UTC](https://forum.wixstudio.com/t/display-elements-in-mobile-only/38535/2 "2018-06-07T12:23:20Z")

</div>

You don’t say how you are trying to show or hide elements in the mobile only mode. What does your code look like? What elements are you using?

---

<div class="post-metadata">

**Author:** ![omarsuriano](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/omarsuriano/32/4416_2.png) [@omarsuriano](https://forum.wixstudio.com/u/omarsuriano)\
**Post date:** [June 7, 2018, 3:51pm UTC](https://forum.wixstudio.com/t/display-elements-in-mobile-only/38535/3 "2018-06-07T15:51:09Z")

</div>

Hi Yisrael, thanks for reply.

I want show only in the mobile mode a button. My code is the following

**import** wixWindow **from** ‘wix-window’;

$w.onReady( **function** () {  
**if** (wixWindow.formFactor === “Mobile”){  
$w(‘#button’).show();  
}  
});

It’s the same I found in the tutorial.

---

<div class="post-metadata">

**Author:** ![yisrael-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yisrael-wix/32/1107_2.png) [@yisrael-wix](https://forum.wixstudio.com/u/yisrael-wix)\
**Post date:** [June 10, 2018, 11:45am UTC](https://forum.wixstudio.com/t/display-elements-in-mobile-only/38535/4 "2018-06-10T11:45:57Z")

</div>

Please post the URL of your site. _Only authorized Wix personnel can get access to your site in the editor._

---

<div class="post-metadata">

**Author:** ![omarsuriano](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/omarsuriano/32/4416_2.png) [@omarsuriano](https://forum.wixstudio.com/u/omarsuriano)\
**Post date:** [June 12, 2018, 8:43am UTC](https://forum.wixstudio.com/t/display-elements-in-mobile-only/38535/5 "2018-06-12T08:43:32Z")

</div>

Hi Yisrael, sorry for delay.  
I fixed it.  
The code works well, my mistake was to view the site in preview mode.  
In live view all is ok.  
Thank you for help

---

<div class="post-metadata">

**Author:** ![yisrael-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yisrael-wix/32/1107_2.png) [@yisrael-wix](https://forum.wixstudio.com/u/yisrael-wix)\
**Post date:** [June 12, 2018, 1:00pm UTC](https://forum.wixstudio.com/t/display-elements-in-mobile-only/38535/6 "2018-06-12T13:00:56Z")

</div>

🎉

---

<div class="post-metadata">

**Author:** ![mjbarr7](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@mjbarr7](https://forum.wixstudio.com/u/mjbarr7)\
**Post date:** [July 19, 2018, 12:52pm UTC](https://forum.wixstudio.com/t/display-elements-in-mobile-only/38535/7 "2018-07-19T12:52:01Z")

</div>

Hello Omar,

I am having the same issue but the site I am designing is not live.  
Did the elements you set to display in mobile only appear in the live version but not in the preview?

Currently using the coding you mentioned the elements appear in mobile editor but not in the preview.

Thanks in advance, really struggling with this!

- Michael

---

<div class="post-metadata">

**Author:** ![omarsuriano](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/omarsuriano/32/4416_2.png) [@omarsuriano](https://forum.wixstudio.com/u/omarsuriano)\
**Post date:** [July 20, 2018, 8:56am UTC](https://forum.wixstudio.com/t/display-elements-in-mobile-only/38535/8 "2018-07-20T08:56:15Z")

</div>

Hi Michael,  
I’ve just checked, the code works well.

In the mobile preview mode the elements don’t appear, but they appear in live view.
