0

I have a draggable with a custom helper function defined like this:

$("article.post").draggable({     
  helper: function(e) {
    // return a dom element
  },
  drag: function(event, ui) {
    var helper = $this.draggable( "option", "helper" );
    // helper is not the returned dom element, but the function definition
  }
});

In the drag callback, I want to access the helper element returned by the function, but $this.draggable( "option", "helper" ) returns the function definition instead.

Is there a way to access the helper element?

4

1 回答 1

1

好的,事实证明它可以通过ui.helper.

于 2012-06-20T05:00:17.410 回答