2012-03-15 75 views
1

我想让一些鼠标事件管理在使用Raphael的IE中工作。'Raphael'在IE中未定义

但是我收到错误'Raphael'在Internet Explorer 9中未定义,即使它在其他浏览器(如Chrome)中运行良好。

这里是jsfiddle和代码:

<div id="sample"></div> 
<div id="status"></div> 



var width = 400; 
var height = 200; 
var paper = Raphael(document.getElementById('sample'), 0, 0, width, height); 

var rect = paper.rect(0, 0, width, height); 
rect.attr({ 
    stroke: "#888", 
    fill: "#eaeaea" 
}); 



var circle = paper.circle(50, 60, 20); 
    circle.attr({ 
     fill: "#f90" 
    }); 

$(circle.node).mouseenter(function(e){ 
     $('#status').html('Entered circle'); 
    }); 
$(circle.node).mouseleave(function(e){ 
     $('#status').html('left circle'); 
    }); 

它使用这个版本的库:https://raw.github.com/DmitryBaranovskiy/raphael/master/raphael-min.js

你能识别为什么不工作在IE帮助?

Thanksk

回答

相关问题