title: Custom Ajax File Uploader, Issue with .AjaxSubmit()
body: <p>I have a multipart form to upload images via AJAX.</p>
  
  <p>The HTML is the following:</p>
  
  <pre><code>    &lt;form name="mainform" id="mainform" class="form_step" action="" method="POST" enctype="multipart/form-data"&gt;
  
      &lt;!-- This is a imagen like a button in the HTML --&gt;
      &lt;img class="anchor_tag" onclick="trigger_img('#');" height="92" width="122" id="addimage_#" src="/some/image/path" alt="#"&gt;
  
      &lt;!-- File input hidden --&gt;
      &lt;input style="display:none;" type="file" name="photoimg_#" id="photoimg_#" class="upload"&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>When the user click the "Upload Button" with .anchor_tag class, I execute this js:</p>
  
  <pre><code>    function trigger_img(divID) {
       $("#photoimg_" + divID).trigger('click');
       $('#photoimg_' + divID).change(function() {
           var options = {
               url: 'http://www.someURL.com/Here/iHave/SomePHP',
               type: "GET",
               complete: function(data) {
                   // Do Something
               }
           };
           $('#mainform').ajaxSubmit(options);
       });
   }
  </code></pre>
  
  <p>If I try to upload a file, the console drop this error:</p>
  
  <pre><code>Uncaught TypeError: undefined is not a function 
  </code></pre>
  
  <p>The error is in this line:</p>
  
  <pre><code>$('#mainform').ajaxSubmit(options);
  </code></pre>
  
  <p>The PHP file is ok because the file is "Uploaded" broken.</p>
  
  <p>Regards.</p>