Skip to content

Instantly share code, notes, and snippets.

@JBarna
Created July 10, 2015 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JBarna/4237bc0fa531e1775606 to your computer and use it in GitHub Desktop.
Save JBarna/4237bc0fa531e1775606 to your computer and use it in GitHub Desktop.
window.ondragover = function(e) { e.preventDefault(); return false; };
window.ondrop = function(e) { e.preventDefault(); return false; };
var holder = window.document.getElementById('currentDirectory');
holder.ondragover = function () { return false; };
holder.ondragleave = function () { return false; };
holder.ondrop = function(e){
e.preventDefault();
e.stopPropagation();
console.log(e);
return false;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment