On 19 August 2010 12:33, Richard Quadling <[email protected]> wrote:
> Hi.
>
> Is there a simple way to drag a div around the screen and simply
> dropping it where it stands.
>
> Top of my head ...
>
> 1 - on mouse down record ev.pointer() and ev.findElement('#draggable').
> 2 - on mouse move move the found element by same amount as mousedown
> pointer x/y relative to the mousedown x/y
> 3 - on mouse up ... nothing
>
> Seems simple enough.
>
> What have I missed?
>
> --
> Richard Quadling.
>
"What have I missed?" Almost everything it seems...
include scriptaculous, effects, dragdrop
new Draggable('cbGrid');
Job done.
--
Richard Quadling.
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.