javascript - Can't set Dropzone options on window.onload -


i'm trying add dropzone.js website i'm having problem setting options when want. using jquery can run on $(document).ready() this:

<body>     <form action="/upload" class="dropzone" id="upload-dropzone"></form>     <script src="app.js"></script> </body> 

//app.js var dropzone = require("../vendor/js/dropzone"); $(document).ready(function(){     dropzone.options.artworkuploaddropzone = {         init: function () {             console.log("init!");         }     }; }); 

however, want use dropzone without jquery , instead set options on window.onload. i've tried following init function not executed.

<body>     <form action="/upload" class="dropzone" id="upload-dropzone"></form>     <script src="app.js"></script> </body> 

//app.js  var dropzone = require("../vendor/js/dropzone"); $(document).ready(function(){     dropzone.options.artworkuploaddropzone = {         init: function () {             console.log("init!");         }     }; }); 

<script src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/4.3.0/dropzone.js</script> 

should be:

<script src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/4.3.0/dropzone.js"></script> 

take @ http://www.dropzonejs.com/#installation

you should able access via window.dropzone


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -