Dropzone.js and ajax

ajax, javascript, jquery

Solution

I had a problem getting a Dropzone that was loaded via Ajax to work and discovered that adding the `Dropzone.discover();` call fixed it for me.

Problem

Im using dropzone.js and loading it using ajax. My menu ID = "#menu" The upload file should appear in "#div1" The callback function is not working. I replaced Dropzone.discover by alert("test"); ``` (document).ready(function() { $("#menu").click(function(){ $("#div1").load("upload.php",null, function(){ Dropzone.discover(); }); ``` Note: I tried the code below, but it didnt work. ``` $("#div1").load("upload.php", function(){ Dropzone.discover(); }); ```

Original source

Related problems