diff --git a/drag-drop-render.js b/drag-drop-render.js index 642ee05..ad71f36 100644 --- a/drag-drop-render.js +++ b/drag-drop-render.js @@ -6,11 +6,12 @@ function handleFiles(files) { files = [ files ]; } - document.body.appendChild(document.createElement('br')); + var container = document.getElementsByClassName('file-container')[0]; + container.innerHTML = ''; files.forEach(function (name) { var div = document.createElement('div'); div.innerHTML = name; - document.body.appendChild(div); + container.appendChild(div); }); } diff --git a/index.html b/index.html index 714f1b2..1faf0dc 100644 --- a/index.html +++ b/index.html @@ -9,10 +9,13 @@