javascript - JQuery draggable change element on start -
is possible change element being dragged on 'start' method? instance, if have button titled 'yellow square' can dragged. says yellow square, when drag you're dragging yellow square, , not button draggable property.
i suppose i'm asking if it's possible alter element being dragged?
thanks!
yes is. have @ api-docu: http://jqueryui.com/draggable/#visual-feedback
example "customer helper" should you're looking for.
this relevant code:
$( "#draggable" ).draggable({ cursor: "move", helper: function( event ) { return $( "<div class='ui-widget-header'>i'm custom helper</div>" ); } });
Comments
Post a Comment