Last active
February 6, 2017 10:53
-
-
Save ozknozsrt/c85e18ea0c5a8eda0fe9ccfae50e824a to your computer and use it in GitHub Desktop.
Dropzone addClass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var upload = document.querySelector('.upload'); | |
upload.addEventListener("dragover", function( event ) { | |
this.classList.add('dragging'); | |
}, false); | |
upload.addEventListener("drop", function( event ) { | |
this.classList.remove('dragging'); | |
}, false); | |
</script> | |
<style> | |
.dragging { | |
border:1px solid green; | |
} | |
</style> | |
<div class="upload"> | |
<form action=""> | |
<input class="uploadfile" type="file" id="imageLoader" name="imageLoader"> | |
<div class="circle"><i class="flaticon-arrows-1"></i></div> | |
<div class="text">Drag and Drop or browse from you computer</div> | |
</form> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment