# How do I hide a strip on desktop but show on mobile? 

**URL:** <https://forum.wixstudio.com/t/how-do-i-hide-a-strip-on-desktop-but-show-on-mobile/1299>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [May 5, 2021, 6:16pm UTC](https://forum.wixstudio.com/t/how-do-i-hide-a-strip-on-desktop-but-show-on-mobile/1299 "2021-05-05T18:16:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenny1654](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/kenny1654/32/6634_2.png) [@kenny1654](https://forum.wixstudio.com/u/kenny1654)\
**Post date:** [May 5, 2021, 6:16pm UTC](https://forum.wixstudio.com/t/how-do-i-hide-a-strip-on-desktop-but-show-on-mobile/1299/1 "2021-05-05T18:16:33Z")

</div>

I want hide the strip on desktop with all elements inside the strip. I want the same strip(and elements) to remain visible on mobile.

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [May 5, 2021, 6:41pm UTC](https://forum.wixstudio.com/t/how-do-i-hide-a-strip-on-desktop-but-show-on-mobile/1299/2 "2021-05-05T18:41:02Z")

</div>

### Get a device’s form factor

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

let formFactor = wixWindow.formFactor; // "Mobile"

```

---

<div class="post-metadata">

**Author:** ![kenny1654](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/kenny1654/32/6634_2.png) [@kenny1654](https://forum.wixstudio.com/u/kenny1654)\
**Post date:** [May 7, 2021, 2:05pm UTC](https://forum.wixstudio.com/t/how-do-i-hide-a-strip-on-desktop-but-show-on-mobile/1299/3 "2021-05-07T14:05:58Z")

</div>

I think I tried pasting this code in the developer mode. Including the code that highlights the elements by their name. I selected hidden ands tried collapsed in the settings. I’m not the most experienced in coding so I could never get the strip hidden and could only hide the text elements.

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [May 7, 2021, 2:36pm UTC](https://forum.wixstudio.com/t/how-do-i-hide-a-strip-on-desktop-but-show-on-mobile/1299/4 "2021-05-07T14:36:35Z")

</div>

@kenny1654  
Please show the faulty code, which you have been created.

---

<div class="post-metadata">

**Author:** ![csikaszk](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@csikaszk](https://forum.wixstudio.com/u/csikaszk)\
**Post date:** [September 9, 2021, 10:49am UTC](https://forum.wixstudio.com/t/how-do-i-hide-a-strip-on-desktop-but-show-on-mobile/1299/5 "2021-09-09T10:49:54Z")

</div>

@russian-dima  
I am hoping to be able to get the full code for the above matter… i spent the last 2 days trying to figure this out…  
i am novice, and just want to hide one slideshow from the desktop view and collapse the space left behind, but show it on the mobile. practically i am after the same function as the click on “eye” does on the zoomed out mobile view.

your help is most appreciated.

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [September 9, 2021, 10:56am UTC](https://forum.wixstudio.com/t/how-do-i-hide-a-strip-on-desktop-but-show-on-mobile/1299/6 "2021-09-09T10:56:03Z")

</div>

Let me try…

you will need something into this direction…

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

$w.onReady(()=>{
	let formFactor = wixWindow.formFactor; console.log(formFactor);
	
	if(formFactor==="Mobile") {start_mobileView();}
	else{start_desktopView();}
});

function start_mobileView() {
   //write here your functions for mobile view --> what should happen here now?
}

function start_desctopView() {
   //write here your functions for desktop view --> what should happen here now?
}

```

Here you will find some REFERENCES…

> **[formFactor - Velo API Reference - Wix.com](https://www.wix.com/velo/reference/wix-window-frontend/formfactor)**
>
> Gets what kind of device is being used to view the page. Note: This property only checks the site visitor's device, and not which Editor X breakpoint they are ...

---

<div class="post-metadata">

**Author:** ![csikaszk](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@csikaszk](https://forum.wixstudio.com/u/csikaszk)\
**Post date:** [September 9, 2021, 8:03pm UTC](https://forum.wixstudio.com/t/how-do-i-hide-a-strip-on-desktop-but-show-on-mobile/1299/7 "2021-09-09T20:03:56Z")

</div>

@russian-dima  
thanks heaps for your reply and advice  
I have used the below code and it did the hide on desktop and showed it on mobile, but on the desktop it showed the blank space (page) which was behind the hidden item. I have tried clicking the “hide” and “collapse” buttons, but made no difference, i am also getting 2 error messages when in preview.

Code used

import wixWindow from ‘wix-window’ ;

$w . onReady (()=\>{  
let formFactor = wixWindow . formFactor ; console . log ( formFactor );

```
if ( formFactor === "Mobile" ) { $w ( "#slideshow2" ). show ();} 
**else** { $w ( "#slideshow2" ). hide ();} 

```

});

I have tried option  
**else** { $w ( “#slideshow2” ).collapse();}

2 error messages:

- Loading the code for the Home page. To debug this code, open mainPage.js in Developer Tools.  
Desktop line 4

when i click on line 4 it takes me back to the code and it puts the blinking courser between console and the full stop

- Improve loading time by turning on caching for the Home page. [Lear](https://support.wix.com/en/article/caching-your-sites-pages) n more

* * *

i have also tried a different code  
import wixWindow from ‘wix-window’;  
$w.onReady(function () {  
if(wixWindow.formFactor === “Mobile”){  
$w(“#slideshhow2”).expand();  
}  
});

with this code i only get the below error and it still does not collapse the space behind the hidden item

- Loading the code for the Home page. To debug this code, open mainPage.js in Developer Tools.

thanks heaps in advance

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [September 9, 2021, 8:58pm UTC](https://forum.wixstudio.com/t/how-do-i-hide-a-strip-on-desktop-but-show-on-mobile/1299/8 "2021-09-09T20:58:32Z")

</div>

Ok —\> i found the ORIGINAL-POST 😁

> **[How to hide and collapse item on desktop view but show it on mobile view |...](https://community.wix.com/velo/forum/coding-with-velo/how-to-hide-and-collapse-item-on-desktop-view-but-show-it-on-mobile-view)**
>
> I am a novice, and thanks heaps for your reply and advice
> 
> I have used the below code and it did the hide on desktop and showed it on mobile, but on the desktop it showed the blank space (page) which was behind the hidden item. I have tried clicking...

---

<div class="post-metadata">

**Author:** ![michaelbdrapper](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/michaelbdrapper/32/8508_2.png) [@michaelbdrapper](https://forum.wixstudio.com/u/michaelbdrapper)\
**Post date:** [October 2, 2022, 5:25pm UTC](https://forum.wixstudio.com/t/how-do-i-hide-a-strip-on-desktop-but-show-on-mobile/1299/9 "2022-10-02T17:25:52Z")

</div>

The simplest answer is to drag the element over another element Right click hover over arrange and click on send to back, on the desktop
