0

I've two (but maybe more) DIVs, animated through jQuery; so now they are running all over my screen, following pseudo random paths.

I want to fire an event every time part of a DIVoverlaps part of another one. Any ideas?

Bruno
  • 5,961
  • 6
  • 33
  • 52
  • 1
    You're going to have to keep track of each divs position and constantly compare them to each other to see if there's overlap. – Jack Jan 22 '13 at 17:44
  • 2
    take a look at this question http://stackoverflow.com/questions/4230029/jquery-javascript-collision-detection – Renan Ivo Jan 22 '13 at 17:45

1 Answers1

3

You could use something like this http://sourceforge.net/projects/jquerycollision/ and check for collisions after each animation step.

alexarno
  • 422
  • 3
  • 15