Hi everyone.
I followed this tutorial Velo Tutorial: Displaying Elements in Mobile Only | Help Center | Wix.com 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
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?
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.
Please post the URL of your site. Only authorized Wix personnel can get access to your site in the editor.
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
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!
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.