Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 711 Bytes

README.md

File metadata and controls

45 lines (34 loc) · 711 Bytes

DragGhost

This jQuery plugin enables to modfiy the HTML5 Drag-and-Drop ghost by using any DOM element.

Usage

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
		}
  });
}

Tutorial