JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<div id="container">
<div id="chairs"></div>
<div id="ontop">
DIV
</div>
</div>
CSS
#container {
position: relative;
}
#holder {
height: 640px;
width: 640px;
}
#ontop {
position: absolute;
background-color: #202020;
color: #fff;
top: 25px;
left: 25px;
padding: 20px;
}
JavaScript
var divontop = $("#ontop");
var r = Raphael("chairs", 640, 640);
Raphael.getColor.reset();
for(var cx=0;cx < 10; cx++) {
for(var cy=0; cy < 10; cy++) {
r.rect(10 + cx * 55,10 + cy * 55, 50, 50, 3).attr({fill: '#dfdfdf'}).mouseover(function() {
var x = this.attr('x');
var y = this.attr('y');
divontop.css({ left: x, top: y } );
});
}
}