How to change the color of a vector when passing the mouse over?
I have a menu made with vectors and when I pass the mouse over I would like them to change their color. I am using the following code:
export function vectorImage97_mouseIn (event) {
$w("#vectorImage1").style.color = "#FFFFFF";
}
Obviously it does not work with vectors, only with buttons. Can someone help me to modify it to works with vector images, please?
Thanks!
Old post with good working solution given, being closed.
Daniel solution is the best for now (and still bad).
All vectors should be manipulated by code
Hi, did you ever find another solution?
It really should just be the fill option.
Thanks. But duplicating the vectors will make my page become even slower. It's an option that I considered but I eliminated it because the site becomes ironically heavy.
Try duplicating the vector image and customising it as you want, see 'Customizing the design of your vector art' here: https://support.wix.com/en/article/about-vector-art
Simply have the original vector image shown on page with the altered version hidden. Then when you use the mouseIn and mouseOut commands, have the altered vector image set to be shown and hidden again.
Although this won't work on mobile versions of your website as you can't use mouseIn on them.