Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]" />
<script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.0.0/raphael-min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <div id="test"></div>
</body>
</html>
 
var paper = Raphael("test", 300, 300);
var rect = paper.rect(10, 10, 50, 50);
var circle = paper.circle(150, 150, 100);
var set = paper.set();
set.push(rect);
set.push(circle);
set.attr({'fill': 'yellow'});
set.click(function(evt) {
  this.attr({'fill': 'red'});
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
smohadjerpro
0viewers