No fill-opacities for VMLs, apparently. IE8 users will just have to see VML's solid colors :P
Raphael Fill Opacity on member.mouseover
-
02-07-2022 - |
Question
I generated a VML file by using http://www.irunmywebsite.com/raphael/SVGTOHTML_LIVE90.php. In the VML file there is a callback function section that determines events:
function callback(member)
{
member.mouseover(function (e) { this.ofill=this.attr('fill');this.attr({fill:'#000000'}); });
member.mouseout(function (e) { this.attr({fill:this.ofill}); });
member.click(function (e) { var thisPath=this.attr('path');alert('You just clicked on Element #'+this.id+'.To help you find it in the code its path starts with......'+thisPath); });
}
As you may be able to see, the first line fills the VML shape hovered over with black. What I want to be able to do is change its fill-opacity instead.
I've tried:
this.ofill=this.attr('fill');this.attr({fill-opacity:'#000000'});
and other similar variations without success. Any ideas what I need to do here?
Thanks
La solution 2
Autres conseils
YOU NEED NUMBER FOR OPACITY NOT COLOR.
Maybe something like this:
this.ofill=this.attr('fill-opacity');this.attr({'fill-opacity':0.5});
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow