import wixLocation from 'wix-location';
export function button4_click(event) {
//Add your code for this event here:
$w("#box1").hide();
$w("#horizontalMenu1").show();
$w("#socialBar1").show();
$w.onReady(function () {
setTimeout(() => {
wixLocation.to("/about");
}, 2000); // set in milliseconds //
});
}
top of page
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
bottom of page
Thank you all for your help. Its working the way I want on both mobile and desktop. Here is the final code in case anyone else has the same problem.
import wixLocation from 'wix-location'; import wixWindow from 'wix-window'; export function button4_click(event) { //Code for desktop if(wixWindow.formFactor === "Desktop"){ $w("#box1").hide(); $w("#horizontalMenu1").show(); $w("#socialBar1").show(); } //Code for non-desktop if(wixWindow.formFactor === "Mobile" || wixWindow.formFactor === "Tablet"){ $w("#box1").hide(); $w("#cart1").show(); $w("#menuToggle1").show(); } //Code for timer function and move onto next page $w.onReady(function () { setTimeout(() => { wixLocation.to("/about"); }, 1700); // set in milliseconds // }); }