João Manolo João Manolo - 3 months ago 17
jQuery Question

dropzone.js programmatically doesn't work

I am trying create drop zones programmatically, but it doesn't work.

HTML Code:

<div class="content-wrap">
<div class="row">
<script type="text/javascript">
$(function() {
url : "/file-upload"
<div class="col-sm-12">
<div class="nest" id="DropZoneClose">
<div class="title-alt">
<div class="body-nest" id="DropZone">
<div id="myDropZone" >
<button style="margin-top: 10px;" class="btn btn-info"
id="submit-all">Submit all files</button>

The drop zone in
<div id="myDropZone">
not appers!

best regards :)


You need to give your #myDropZone div some width and height so that it takes up space. Heres a jsfiddle.

Alternatively, you can add the dropzone class to your div to get the default styling that you see in the demos. Heres the jsfiddle for that.