views:

42

answers:

1

Hi, is it possible to say "draggable div's -> no overlap" ?

I think the mainproblem is the position:absolute; ... right?

kind reagards Peter

A: 

There isn't a built-in function for collision detection in jQuery UI draggable, unless you're actually after something like sorting. The closest thing that's built-in to what you want is sortable's plceholder, which looks like this.

The short version is collision detection with every dragged element isn't trivial in terms of performance (depending on the number of elements), so it's left out of the library since it's a very rare request. You could however calculate the collisions yourself inside the draggable's drag event if you really do need the collision detection.

Nick Craver