5
Ok, now that I have a firm grasp on what you're doing, I think I have what you're looking for. The below still applies in terms of optimizing what you posted, but I think what you want is more along the lines of the following: fiddle var paper = Raphael("canvas", 500, 500); var rectangles = { ...