Hi,
I need to modify the element when as soon as it starts being dragged. The 'start' callback takes two arguments, only the first of them seems to be usable for me. The deal is that I'm using helper: 'clone'
which makes event.originalTarget
to point only the "original" element, not the new one (which is in fact the one being dragged).
Any solutions?
Thanks,
m.
views:
17answers:
1
+1
A:
Isn't ui.helper
what you need? From the docs:
ui.helper - the jQuery object representing the helper that's being dragged
So you'll have something like
$( ".selector" ).draggable({
start: function(event, ui) {
ui.helper.modify(the_way_I_want_to_modify_it);
}
});
MvanGeest
2010-08-04 22:22:46
not really. ui.helper points the `ul` element, while the one I'm dragging is it's `li`
migajek
2010-08-04 22:58:36
Could you make an example using http://jsFiddle.net? Maybe the `ul` you see is a new `ul` created by jQuery to hold the `li` that's being dragged. (You can't have a `li` outside an `ul`.)
MvanGeest
2010-08-05 11:02:14