@russian-dima
This is the code that I ended up using with a little help from a friend as I am a complete novice with code
which I think is what were saying above. Thank you for your help.
function resetButtons ( ) {
$w ( “#btnStrategy” ). style . color = “#CC192A” ;
$w ( “#btnMarketing” ). style . color = “#CC192A” ;
$w ( “#btnDigital” ). style . color = “#CC192A” ;
$w ( “#btnCustomer” ). style . color = “#CC192A” ;
}
$w . onReady ( function restButtonColors () {
$w ( “#btnStrategy” ). style . color = “white” ;
$w ( “#btnStrategy” ). onClick (() => {
resetButtons ();
$w ( “#btnStrategy” ). style . color = “white” ;
$w ( ‘#statebox8’ ). changeState ( “State1” );
});
$w ( “#btnMarketing” ). onClick (() => {
resetButtons ();
$w ( “#btnMarketing” ). style . color = “white” ;
$w ( ‘#statebox8’ ). changeState ( “State2” );
});
$w ( “#btnDigital” ). onClick (() => {
resetButtons ();
$w ( “#btnDigital” ). style . color = “white” ;
$w ( ‘#statebox8’ ). changeState ( “State3” );
});
$w ( “#btnCustomer” ). onClick (() => {
resetButtons ();
$w ( “#btnCustomer” ). style . color = “white” ;
$w ( ‘#statebox8’ ). changeState ( “State4” );
});
});