Hi guys.
I try to create a button that will open facebook for desktop in the browser and for mobile on the app.
it works great.
i just want the desktop one to be open in a new window.
can someone help me out ?
that’s my code:
import wixLocation from ‘wix-location’;
import wixWindow from ‘wix-window’;
export function iconButton1_click(event) {
//Add your code for this event here:
if (wixWindow.formFactor === “Desktop”) {
wixLocation.to(‘Redirecting...’);
}
if (wixWindow.formFactor === “Mobile”) [{]({
wixLocation.to(‘fb://facebook.com/DotsToLines/’);
}
})
[ wixLocation.to(‘fb://facebook.com/DotsToLines/’);]({
wixLocation.to(‘fb://facebook.com/DotsToLines/’);
}
})
[ }]({
wixLocation.to(‘fb://facebook.com/DotsToLines/’);
}
})
[}]({
wixLocation.to(‘fb://facebook.com/DotsToLines/’);
}
})
thanks a lot !!!