<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Example raphael</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
test
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script>
<script type="text/javascript" src="raphael-min.js"></script>
<script type="text/javascript">
// Creates canvas 320 � 200 at 10, 50
var paper = Raphael(10, 50, 500, 200);
lineSize : 500;
element = new Array();
position = 'left';
//rect = paper.rect(20, 20, 50, 50).attr({"fill": "#fbb"});
//rect.attr({"stroke-width":1});
for(var i=0; i<100; i++) {
var x = 5*i;
var width = Math.floor(Math.random()*20);
p = element[i] = paper.rect(x, 50-width , 5, width ).attr({stroke:"#fff","stroke-width":0.3, fill: "hsb(0."+i+", 1, 1)",});
p.mouseover(function () {
var heightM = Math.floor(Math.random()*50)
this.animate({height:heightM }, 400, "bounce");
})
}
for(var i=0; i<element.length; i++) {
MyElement = element[i];
$(MyElement.node).mouseover(function (){
var heightM = Math.floor(Math.random()*50)
this.parent.animate({height:heightM }, 400, "bounce");
});
}
/*
$(rect.node).mouseover(function () {
if (position === 'left') {
rect.animate({x: 300, y: 100}, 400, "<>");
position = 'right';
} else {
rect.animate({x: 20, y: 20 }, 800, "bounce");
position = 'left';
}
});
*/
setInterval(function () {
}, 10);
</script>
test
</body>
</html>