title: How to use multiple instances of plupload on single form
body: <p>I want to use multiple instances of plupload on single form. I saw the following link. But i dnt know how to implement that in wordpress. </p>
  
  <p><a href="http://jsfiddle.net/X65zF/36/" rel="nofollow">jsfiddle.net/X65zF/36/</a>.</p>
  
  <p>So I can upload images from first upload link, then documents from second upload link etc..</p>
  
  <p>This is my html code </p>
  
  <pre><code>&lt;a id="aaiu-uploader" class="aaiu_button" href="#"&gt;&lt;?php _e('*Select Images 
  (mandatory)','wpestate');?&gt;&lt;/a&gt;
                      &lt;input type="hidden" name="attachid" id="attachid" value="&lt;?php
   echo $attachid;?&gt;"&gt;
                      &lt;input type="hidden" name="attachthumb" id="attachthumb" value="&lt;?
   php echo $thumbid;?&gt;"&gt; 
  </code></pre>
  
  <p>This is my js code</p>
  
  <pre><code>   jQuery(document).ready(function($) {
     "use strict";
  
      if (typeof(plupload) !== 'undefined') {
  
  
          var uploader = new plupload.Uploader(ajax_vars.plupload);
  
          uploader.init();
  
          uploader.bind('FilesAdded', function (up, files) {
  
              $.each(files, function (i, file) {
               //   console.log('append'+file.id );
  
  
                  $('#aaiu-upload-imagelist').append(
                      '&lt;div id="' + file.id + '"&gt;' +
                          file.name + ' (' + plupload.formatSize(file.size) + ') &lt;b&gt;&lt;/b&gt;' 
    +
                          '&lt;/div&gt;');
              });
  
              up.refresh(); // Reposition Flash/Silverlight
              uploader.start();
          });
  
  
  
  
                         uploader.bind('UploadProgress', function (up, file) {
              $('#' + file.id + " b").html(file.percent + "%");
          });
  
  
  
          // On erro occur
          uploader.bind('Error', function (up, err) {
              $('#aaiu-upload-imagelist').append("&lt;div&gt;Error: " + err.code +
                  ", Message: " + err.message +
                  (err.file ? ", File: " + err.file.name : "") +
                  "&lt;/div&gt;"
              );
              up.refresh(); // Reposition Flash/Silverlight
          });
  
  
  
          uploader.bind('FileUploaded', function (up, file, response) {
  
              var result = $.parseJSON(response.response);
             // console.log(result);
  
              $('#' + file.id).remove();
              if (result.success) {               
                  $('#profile-image').css('background-image','url("'+result.html+'")');
                  $('#profile-image').attr('data-profileurl',result.html);
                  $('#profile-image_id').val(result.attach);
  
                  var all_id=$('#attachid').val();
                  all_id=all_id+","+result.attach;
                  $('#attachid').val(all_id);
                  $('#imagelist').append('&lt;div class="uploaded_images" data- 
   imageid="'+result.attach+'"&gt;&lt;img src="'+result.html+'" alt="thumb" /&gt;&lt;i class="fa 
   deleter fa-trash-o"&gt;&lt;/i&gt; &lt;/div&gt;');
                  delete_binder();
                  thumb_setter();
              }
          });
  
  
          $('#aaiu-uploader').click(function (e) {
                    uploader.start();
                    e.preventDefault();
                });
  
          $('#aaiu-uploader2').click(function (e) {
                    uploader.start();
                    e.preventDefault();
                });
  
  
   }
  
   });
  </code></pre>
  
  <p>Suggest something...Anyone has done this kind of thing??</p>