Hi jmanry,

I don't know if this can help you, but if you use a deferred or
delayed function when trying to change the left value, or class, like

onEnd: function(draggable, event) {

    (function() {

         $(this).setStyle({ left:
whatever }).addClassName('whatever');

    }.bind(draggable)).delay(10); // 10 milliseconds should be enough
to do your stuff


I haven't tested it though.

Hope it helps,


On Oct 8, 12:02 pm, jmanry <[EMAIL PROTECTED]> wrote:
> I am designing a web page in which an elementA is to be dragged and
> dropped into another elementB. Once elementA is inside element B, I
> need for elementA to shift left. Ideally, I would do this by changing
> its class within the onDrop callback. However, doing this has no
> effect.
> Via Firebug, I can see that Scriptaculous sets the z-index, "top"
> value and "left" value as an inline style during the drag and that
> these values are then reset to the original values at the end of the
> drag. But since this happens in the inline style for the element, it
> overrides the settings of the new CSS class.
> When I try to unset or change the "left" value in the inline style via
> either the onDrop, onDropped, or onEnd callbacks,  I can verify (via
> alerts) that I am changing the value at that moment, but afterwards,
> the values are reset to the original settings. It looks as though
> Scriptaculous sets these values after all the callback functions have
> run.
> The question is, is there a way to remove the inline styles set by
> Scriptaculous at the end of the drag? Or is there another way around
> this issue?
> Thanks in advance for any ideas!
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 prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to