Some pages on my site would be best viewed in desktop version even if the user is on the mobile version. How do I ensure that once those pages opens it changes the view to tablet/desktop.
import wixWindow from 'wix-window';
$w.onReady(function () {
if (wixWindow.formFactor === "Mobile") {
wixWindow.formFactor.replace("Mobile", "Desktop");
}
});
The .formFactor method is a getter. It gives you the current device type. You can’t set it to be something else.
I’m not really sure what you’re trying to do. If you want mobile devices to have something like the desktop view, just go to the editor mobile view and design it to look like the desktop.
For example if a user is using a mobile phone and accesses a page and sees the mobile version of that page , I want a situation when the user navigates to view another page on the site the view changes to desktop version for that page and other specific pages. basically certain pages cannot be viewed as mobile version only as desktop no matter the device.