问题
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
来源:https://stackoverflow.com/questions/3416598/jqueryui-draggable-helper-option-help