I want to know how to get the item that is in drag and so I can change some properties of it. Here's the example below:
According to the example above I need to change the item I'm dragging and not its original.
You can do this in two ways:
$('#seletor').draggable({
drag: function (event, ui) {
//só acessar o ui.helper
$(ui.helper).css('color', 'red');
}
});
Or you can also grab the event via on and change your clone
$('#seletor').on('drag', function( event, ui ) {
//só acessar o ui.helper
$(ui.helper).css('color', 'red');
});
follow the jsfiddle :)