Your styles weren't applied correctly: http://jsfiddle.net/4fCbQ/4/
There was a trailing comma in your selector.


On Sat, Mar 12, 2011 at 4:20 PM, Rambo <[email protected]> wrote:

> Using mootools 1.3.
> The demo above is not what I want, I want the elemen to to move with
> the mouse, not a clone.
>
> It seems i was not clear about the position relative thing. If I make
> an element with position static draggable, the desired behavior is to
> apply position relative and keep top/left properties intact (that
> would mean, left = top = 0). If i manually set position relative to
> those elements and make them draggable, left & top properties become
> the offsetParent of the element or something like that. No one would
> like that.
>
> UPDATE: i made a demo and the behavior got weirder:
> http://jsfiddle.net/4fCbQ/2/
>
> On 12 mar, 11:57, Arian Stolwijk <[email protected]> wrote:
> > First calling the docs poor and saying jq is lots better doesn't help
> very
> > much to get you an answer. (sure, there's always is room for improvement)
> >
> > I guess you want something like this:
> http://mootools.net/demos/?demo=Sortables
> >
> > Furthermore I'd like to know how you could move elements without making
> them
> > absolute or modifying the left/top styles. The container of the dragged
> > element could be relative yes. And maybe you could change the
> > margin-top/margin-left styles (which you can set as an option btw). (if
> we
> > don't consider css3 transforms for now).
> >
> > The demo does use some undocumented method, but because it is not
> documented
> > it's better for you to don't use it. However that doesn't mean you cannot
> > use it. It is used here because first the mousedown event was captured,
> then
> > the element was cloned which in turn is used as the draggable element.
> > Usually Drag does this for you, however in this case the start method
> should
> > be invoked directly passing the event object to start the dragging.
> >
> > I guess the best thing to get help is to make a jsfiddle of what you
> > currently have and then we can help you relatively easy. Also what
> version
> > of MooTools are you using?
> >
> >
> >
> >
> >
> >
> >
> > On Sat, Mar 12, 2011 at 3:11 PM, Rambo <[email protected]> wrote:
> > > I need to build a simple sortable list where the element being dragged
> > > moves with the mouse. I do not want a clone and  I do not want the
> > > element NOT to move with the mouse. I read the poor documentation this
> > > framework has and couldn't find that magic option. Could you please
> > > tell me if there is any way to do that?
> >
> > > Also, i tried making a few elements draggable and a nasty behaviour
> > > showed up. I have list items statically positioned, one below the
> > > other. After calling makeDraggable(), Mootools magically adds position
> > > absolute to all those elements instead of relative, and not only that,
> > > left and top properties are also applied, moving those elements down!
> > > seriously... WTF? Is there any way to make an element draggable while
> > > keeping that element's position?
> >
> > > This is really frustrating. I'm not asking too much, this can be done
> > > with jQuery in a few lines without spending a whole day guessing the
> > > documentation....
> >
> > > Example, take a look at this demo:
> > >http://mootools.net/demos/?demo=Drag.Cart
> > > There is a magic undocumented method "drag.start(event);", what is
> > > that?
>

Reply via email to