using jquery draggable can you create a helper based on the dragged item?
- by user169867
I wish to create a custom helper based on the element being dragged. I'm dragging documents and I'd like the document's number to be part of the custom helper.
I know how to create a helper during init like this:
helper: function()
{
return $("<div class='fax16'></div>");
}
But what I really want to do is maybe in response to the start event get access to the element being dragged and use some of its properties to set the helper.
Something like:
start: function(event, ui)
{
var docID = //somehow access the dragged element
ui.helper = $("<div class='save16'>" + docID + "</div>"); //Set drag Helper
}
Can this be done?