This jQuery plugin enables to modfiy the HTML5 Drag-and-Drop ghost by using any DOM element.
function handleDragstart(event) {
event.attachGhost({
style: {
'background-color': 'black'
}
});
}
function handleDragstart(event) {
event.attachGhost({
elem: $('#myghost').get(0),
style: {
'background-color': 'black'
}
});
}
function handleDragstart(event) {
event.attachGhost({
elem: $('#myghost').get(0),
style: {
'background-color': 'black'
},
pos: {
x: 10,
y: 20
}
});
}