The helper function that you use is called as follows :
$(o.helper.apply(this.element[0], [event]))
This means that this refers to .draggable , which is required inside this function, for example:
$('.draggable').draggable({ helper: function(event) { return $('<span style="white-space:nowrap;"/>') .text($(this).text() + " helper"); } });
You can check it out here .
Nick craver
source share