Hi guys, how can i change the homepage between pc and mobile version? Thank you
import wixWindow from 'wix-window';
$w.onReady(function () {
if(wixWindow.formFactor === "Mobile"){
$w("#myMobileElement").show()
}
else {$w("#myMobileElement").hide()}
);
Do also not forget to think about → expand and collapse!
hi, thanks for your reply. I’ve just written all this but i have red line in in #myMobileElement, why? more over, could youe xplain me what means and how i can do expanding and collpasing? is it useful for? Thank you
Read about the Mobile Editor for information regarding the display on different form factors. For coding that’s dependent on the device that the site’s being viewed on, you can use the formFactor API .
Hi there, thank you for your reply. Unfortunately i don’t understand how hide the pc homepage version and show the mobile device homepage mode. I’ve created two homepages and for pc seems all right insted for mobile device, after welcome design with my logo, appears wrong homepage at first and then, recharge automaticly, comes right homepage for mobile device. It seems i have to set wrong homepage hide and showing that one right but for me it’s very dofficult to understand javascript language, could you gelp me, pls?
Choosing a different homepage for mobile is currently not supported .
See the Velo Tutorial: Redirecting Mobile Visitors for details on how you can redirect to a mobile homepage.
For redirecting mobile visitors in that particular page, i have to write javascript istructions on “masterPage.js”?