Is it possible to modify the clone helper that jQueryUI creates with draggable element? I don't want the exact clone as the helper, I just want something similar to it.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
For the helper
option, instead of clone
, use a function that returns a DOM object. Make this object "similar" any way you like. Something like this:
$('.selector').draggable({
helper: function(){
var foo = dom_object_you_create_or_specify;
return foo;
}
});
References: jQuery UI Draggable