I require assistance on hit detection in javascript. I have tried many scripts but they all do not work.
 My current code:
function collision($div1, $div2) {
 // nothing, this is where my collision detection needs to be
}
My divs:
<style>
/* CSS */
/* character */
#character {
  position:absolute;
}
/* masses */
#bluemass {
  position:absolute;
}
</style>
<center>
<div class="bluemass" id="bluemass">
    <img src='./pic/bluemass.png' height='35' width='35' />
</div> </center>
<div class="character" id="character">
<img src="./pic/char.png" alt="info" height="90" width="90" />
<br>
<? 
   $v = $_GET["username"]; 
   echo "<div style ='font:21px/21px Courier,tahoma,sans-serif;'>$v</div>";
?>
<?
   echo "<div style ='font:21px/21px Courier,tahoma,sans-serif;'>$mass</div>";
?>
</div>
How would I detect if the div character collides/overlaps with the div bluemass? Thanks in advance, this is my testing site.
 
    