Displaying 1 result from an estimated 1 matches for "pos_2".
Did you mean:
pos_r
2008 May 30
1
Drag and Drop with scriptaculous
...around with drag and drop.
What I try to do:
I have some Draggables and some Droppables. You can drag each
Draggables to each Droppables.
When I drop a Draggables I want to center the Draggables inside the
Droppable.
And here I get my first problems:-(
I use this code:
Droppables.add( ''pos_2'' , {
onDrop: function( element, target )
{
target.highlight();
element.absolutize();
new Effect.Move( element, { x: target.offsetLeft, y:
target.offsetTop, mode: ''absolute'' } );
}
});
When I do this, it seams to work fine, but:
After the "element.abs...