Hey! I’ve created a site and I’m trying to have certain elements not be shown on the mobile version of some pages (my Footer/Gallery), is there a way or specific code I could use to achieve the same?
Thanks in advance.
Hey! I’ve created a site and I’m trying to have certain elements not be shown on the mobile version of some pages (my Footer/Gallery), is there a way or specific code I could use to achieve the same?
Thanks in advance.
Use the wixWindow api
import {wixWindow} from ‘wix-window’;
WixWindows.formfactor returns “Desktop” or “Mobile”
Hey! Thank you so much for the swift response. At first I didn’t get what you meant because all of this is new to me but I just figured it out with the guidance/tip you gave.
MY CODE:
import wixWindow from ‘wix-window’;
$w.onReady(function () {
if(wixWindow.formFactor === “Mobile”){
$w(" #ELEMENT “).hide(); $w(” #ELEMENT ").collapse();
}
});
Now when I view certain pages I won’t have those elements create a seemingly infinite scrolling experience and I can publish the site and sleep at night once more. Thanks again!