Hello, whenever I add the code shown below to a button the link feature doesn’t work.
anyone know how to fix this?
export function button4_click(event) {
$w("#button4").style.color = "#E8B556";
$w("#button1").style.color = "#E8E6E6";
$w("#button2").style.color = "#E8E6E6";
$w("#button3").style.color = "#E8E6E6";
}
Where is the link as it is not shown in your code?
If the link is done through the Wix Editor link settings, then you simply need to move the link to be included into your code.
You can’t have a button have a function attached to it through the Wix Editor and also have a function attached to it through code like this.
Just simply add the link using Wix Location API and the .to() function into your code.
https://www.wix.com/corvid/reference/wix-location.html#to