title: jQuery - Creating multiple instance
body: <p>I'm using the following jquery plugin to file upload.</p>
  
  <p><a href="http://www.jscripts.info/mfupload.php" rel="nofollow">http://www.jscripts.info/mfupload.php</a></p>
  
  <p>This works great for a single upload box. I tried for multiple upload boxes by changing the ID into class, but no luck.</p>
  
  <p>This is how its initialize the function,</p>
  
  <pre><code>$(document).ready(function() {
      //function AjaxUpload($posturl,fieldname,formname){
          var errors="";
          //alert($("div.uploadaction").html());
          $('#upload').mfupload({
  
              type        : '',   //all types
              maxsize     : 20,
              post_upload : $("div.uploadaction").html(),
              folder      : "./",
              ini_text    : "&lt;div class='halfmargin'&gt;&lt;/div&gt;&lt;span&gt;Click / Drag your logo file here&lt;/span&gt;",
              over_text   : "&lt;div class='halfmargin'&gt;&lt;/div&gt;&lt;span class='drop'&gt;Drop Here&lt;/span&gt;",
              over_col    : 'white',
              over_bkcol  : 'green',
  
              init        : function(){       
                  $("#uploaded").empty();
              },
  
              start       : function(result){     
                  $("#uploaded").append("&lt;div id='FILE"+result.fileno+"' class='files'&gt;"+result.filename+"&lt;div id='PRO"+result.fileno+"' class='progrez_img'&gt;&lt;img src='/images/ajax-loader.gif' /&gt;&lt;/div&gt;&lt;/div&gt;"); 
              },
  
              loaded      : function(result){
                  $("#PRO"+result.fileno).remove();
                  $("#FILE"+result.fileno).html("&lt;div class='smallpadding'&gt;Uploaded: "+result.filename+" ("+result.size+")&lt;input type='hidden' name='hdnfilename[]' value='"+result.filename+"' /&gt;&lt;/div&gt;");   
                  //$('#'+formname).append('&lt;input type=\"hidden\" name=\"hdnfilename[]\" value=\"' +result.filename+ '\"&gt;');     
  
  /*              &lt;input type='hidden' name='hdnfilename[]' value='"+result.filename+"' /&gt;    
  */          },
  
              progress    : function(result){
                  $("#PRO"+result.fileno).css("width", result.perc+"%");
              },
  
              error       : function(error){
                  errors += error.filename+": "+error.err_des+"\n";
              },
  
              completed   : function(){
                  if (errors != "") {
                      alert(errors);
                      errors = "";
                  }
              }
          });
  
      })
  </code></pre>
  
  <p>Please help me create multiple upload boxes.</p>
  
  <p>Regards.</p>