> 
> **Possible Duplicate:**  
> 
> [How to detect if two divs touch with jquery?](https://stackoverflow.com/questions/5419134/how-to-detect-if-two-divs-touch-with-jquery) 
> 
> 
> 

I've spent a lot of time trying to figure out how to detect if two divs are overlapping.  

```
$("#" + checkform).collision("#" + checkform + "w").each(function(){
    alert("Collision");
});

```

Would you use the gamequery plugin and/or how would you do it?