So i tried the method provided by wix on how to do this. It did not work.
I tried to manually code hiding a button. I managed to hide the button on desktop but it wont show on mobile. I can see it in editing mode but not preview mode.
My code looks like this
import wixWindow from 'wix-window'; $w.onReady(function () { if (wixWindow.formFactor === "Desktop") { $w("#button1").hide(); } else { $w("#button1").show(); } }) ; $w.onReady(function () { if(wixWindow.formFactor === "Mobile"){ $w("#button1").show(); } }) ;
Hi,
I recommend using only one onReady function instead of multiple onReady functions. This should solve the issue. In order to check it, please view your live site, and not the editor preview.
Good luck,
Tal.
I can hide the button but no matter what i do, i cannot get it to show on mobile