Hi,
I want to change the opacity for a button with the onClick functions, but then set the rest of the button colors back to normal! For instance, let's say I have $w('#button1'), $w('#button2'), and $w('#button3'), and they all have a background opacity of 50%. When I click #button3, I want to be able to set its opacity to 75%. However, when I subsequently click #button2, I want to set its opacity to 75% but also set #button3's back to 50%. I want to be able to do this universally, so for each onClick() command set all button opacities back to 50%. Is this possible?
Please tell me if this is unclear!
Thanks!
To use this code-snipet, you will have to set your opacity in the wix-editor to 100% first and then continue to set the opacity and colors by code!
$w("#myElement").style.backgroundColor="rgba(255,0,0,0.5)";