function dragging_started(event)
{
event.dataTransfer.effectAllowed = "move";
event.dataTransfer.dropEffect = "move";
console.log("Dragging Started");
}
function dragging()
{
console.log("Dragging");
}
function dragging_ended()
{
console.log("Dragging Ended");
}
function entered_target_zone(e)
{
event.preventDefault();//default browser action is not to make any element a dropable zone. We are preventing the default action for this element to make it a droppable zone.
console.log("Dragged element enters droping zone");
}
function mouse_moving_in_targetzone(e)
{
event.preventDefault();//default browser action is not to make any element a dropable zone. We are preventing the default action for this element to make it a droppable zone.
console.log("Mouse moving in target zone");
}
function left_target_zone()
{
console.log("Dragged element left droping zone");
}
function element_dropped(e)
{
console.log("Element dropped on the target zone");
e.stopPropagation();//browsers usually redirect after drop event. I don't know why? Its beffer to stop it by stopping bubbling of the event to the browser window.
}
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.