Button Hover not working on Multi-box state change

Hi,

I have external buttons which are coded to change the multi-box state element on click. I also have the buttons coded to be highlighted when that particular state is active.

However, i’m unable to figure out the hover of the buttons. I’ve used the generic hover tool to simulate the hover which works great, however if the user then switches state the hover no longer works.

Does anyone have any advice? I’ve tried to code it into Velo and it doesn’t seem to work on mouse in/out either?

Posting screenshots of your elements and your code may give the community a better understanding what you currently have.

From what you wrote, apparently the problem is button is disabled, which does not allow you to click on it and also shows you the indication of what is open.
If you want the button to respond, you can’t disable it
Maybe build your own custom button
Or use the box the button is in to trigger the click interaction even though the button is disabled

This is my current code


It seems that changing the properties of the button in the code overrides the original settings.

Try to get the hovering effect in a different way (maybe add components)

If the design allows, I would suggest moving all the buttons to the repeater and connecting the data to cms (the names of the boxes) so you can work on one component in the repeater and run the code inside the repeater
It is much simpler to make changes to all components at the same time

Thanks for sharing the screenshots!

Seems everything looks correct in your code. It is very strange that the Hover settings get overridden even though the Hover state seems to be Read Only. One would assume it would remain the same. I guess it’s one of those quirky Wix flaws!

The most efficient approach I recommend would be to duplicate your buttons and place them on top of each other.

For example:

stockRegular <—— onClick changes state and hides itself

stockClicked <——- shows itself but is already styled the way you wanted it so you no longer have to style it via code

Repeat for all the buttons.

So i’ve figured it out, it’s a bit of a botch job but I added an ‘on mouse enter’ line of code in the main box the buttons sit in and it now works. Unsure what It’s done but it seems to have sorted the disabled after state change button issues…