javascript - how to activate dropzone on icon click -


i using image . activate dropzone image select box on image click. when user click on <i class="fa fa-image" id="dzopen"></i> user can select file browsing , uploading image preview should display on <div id="media-upload-previews"></div>

 <i class="fa fa-image" id="dzopen"></i> <div id="media-upload-previews"> </div> <script>     dropzone.options.myawesomedropzone = {         paramname: "file",         maxfilesize: 10,         url: 'uploadimages',         previewscontainer: "#media-upload-previews",         uploadmultiple: true,         paralleluploads: 5,         maxfiles: 20     } </script> 

you can wrapp code in jquery click event

$(document).on("click", "#dzopen", function(){    //initilize dropzone here . }); 

Comments

Popular posts from this blog

javascript - Wordpress slider, not displayed 100% width -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -