jQueryUI Draggable Helper Option Help

时间秒杀一切 提交于 2020-01-03 11:52:47

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!