I have a number of shapes drawn using Raphael.js that I need to add a shadow to and enlarge slightly when the mouse rolls over. I have everything working perfectly in Firefox and Chrome, but in Internet Explorer, the mouseout event doesn't appear to fire.
This is the mouseover/mouseout code I have for each hexagon shape (hexagon is a reference to the rafael element, this/_Promise being a reference to a class that defines the events among other things):
this.hexagon.mouseover(function(){
_Promise.hexagon.toFront();
_Promise.hexagon.attr( { "transform": "...s" + scaleAmountOnRollover } );
_Promise.shadow = _Promise.hexagon.glow({ "width": 8, "opacity": 0.4 });
});
this.hexagon.mouseout(function(){
_Promise.hexagon.attr( { "transform": "...s" + (1/scaleAmountOnRollover) } );
_Promise.shadow.remove();
});
In IE (up to and including version 9), the hexagon shapes just keep getting bigger and bigger because the mouseout event isn't firing. I've put some console.logs in there to check this is definitely the case.
Any suggestions would be appreciated!