jQuery/JavaScript collision detection

How to detect if two <div> elements have collided?

The two divs are simple coloured boxes travelling perpendicular to each other, so no complicated shapes or angles.

27 thoughts on “jQuery/JavaScript collision detection”

Leave a Comment