次のように定義されたカスタムヘルパー関数を使用してドラッグ可能です。
$("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
}
});
ドラッグ コールバックで、関数によって返されるヘルパー要素にアクセスしたいのですが、$this.draggable( "option", "helper" )
代わりに関数定義を返します。
ヘルパー要素にアクセスする方法はありますか?