I am trying to hide the element in desktop and I am able to do so but element are also gets hidden in mobile version.
some time it appears some time it doesn’t if I reload page two to three time it shows up on the mobile
here is the code which I use. I used this code on every page but on some pages some elements get disappear on live site & on some page all element get disappear and also on some page every element is showing up and there no code except this one.
This code I take from wix article Velo Tutorial: Displaying Elements in Mobile Only | Help Center | Wix.com
import wixWindow from ‘wix-window’; $w.onReady(function () { if(wixWindow.formFactor === “Mobile”){ $w(“#your_first_element’s_ID”).show(); $w(“#your_second_element’s_ID”).show(); } });
This is my code —
import wixWindow from ‘wix-window’;
$w.onReady( function () {
if(wixWindow.formFactor === “Mobile” &&
wixWindow.rendering.renderCycle === 1) {
$w(“#gallery1”).show();
$w(“#button17”).show();
$w(“#box6”).show();
$w(“#box9”).show();
$w(“#box1”).show();
$w(“#box8”).show();
$w(“#box3”).show();
$w(“#box2”).show();
$w(“#box10”).show();
$w(“#googleMaps1”).show();
$w(“#your_second_element’s_ID”).show();
}
} );
Please check my site
my site is orooms.in
there are many pages which are affected but this is the one of them which is having issue - https://www.orooms.in/location-kota
on page also I put same code but it is working fine on mobile
On desktop all element get hidden but on mobile also its getting hidden