I am using Raphael graphics and animations which is a javascript library. I want the user to mouseover the blue square in the bottom row, middle column. When they mouseover I want the blue box to glow(Raphael function) black. I am trying to use this function on rec8, but I don't think I'm doing it correctly. Can someone please correct my code or help me. Thanks. :) Live Long and Prosper.
<html>
<head><title></title>
<script src="raphael-min.js"></script>
<script src="jquery-1.7.2.js"></script>
<style type="text/css">
#input
{
margin-top:-200px;
}
</style>
</head>
<body>
<div id="draw-here-raphael" style="height: 400px; width: 400px; background: #666; z-index:0;">
</div>
<div id="input" style="z-index:99;" >
<input type="text" value="0"; style="text-align:right;" /><br />
</form>
</div>
<script type="text/javascript">
//all your javascript goes here
$(function() {
var r = new Raphael("draw-here-raphael"),
// Store where the box is
position = 'left',
// Make our pink rectangle
rec = r.rect(20, 20, 250, 300, 10).attr({"fill": "#fbb"});
$("rect").mouseover(function(e) {
$(this).attr({"fill": "red"});
});
$("rect").mouseout(function(e) {
$(this).attr({"fill": "#fbb"});
});
//first column
rec2 = r.rect(30, 80, 50, 40, 5).attr({"fill": "blue"});
rec3 = r.rect(30, 130, 50, 40, 5).attr({"fill": "blue"});
rec4 = r.rect(30, 180, 50, 40, 5).attr({"fill": "blue"});
rec5 = r.rect(30, 240, 50, 40, 5).attr({"fill": "blue"});
//second column
rec6 = r.rect(90, 80, 50, 40, 5).attr({"fill": "blue"});
rec2 = r.rect(90, 130, 50, 40, 5).attr({"fill": "blue"});
rec7 = r.rect(90, 180, 50, 40, 5).attr({"fill": "blue"});
rec8 = r.rect(90, 240, 50, 40, 5).attr({"fill": "blue"});
$("rec8").mouseover(function(e) {
$(this).glow({width:10});
});
$("rec8").mouseout(function(e) {
$(this).glow({width:0});
});
//third column
rec9 = r.rect(150, 80, 50, 40, 5).attr({"fill": "blue"});
rec10 = r.rect(150, 130, 50, 40, 5).attr({"fill": "blue"});
rec11 = r.rect(150, 180, 50, 40, 5).attr({"fill": "blue"});
rec12 = r.rect(150, 240, 50, 40, 5).attr({"fill": "blue"});
});
</script>
</body>
</html>