title: Strange jQuery error .children(...).attr(...).change is not a function?
body: <p>I appreciate this may not be a great question, but I'm at my wits end (if the question needs deleting, let me know)</p>
  
  <p>I've installed a plugin in Magento (Zetaprints Web To Print) and the image uploading portion of this plugin doesn't work. I've contacted their support, but they don't want to know about it unless I cough up money.</p>
  
  <p>I think it's due to JavaScript errors being thrown, in both the Firefox and Chrome consoles I get error messages:</p>
  
  <p>Chrome</p>
  
  <blockquote>
    <p>Uncaught TypeError: Object  has no method 'change'</p>
  </blockquote>
  
  <p>Firefox</p>
  
  <blockquote>
    <p>TypeError: $td.children(...).attr(...).change is not a function</p>
  </blockquote>
  
  <p>I'm not an expert with jQuery or JavaScript by any means, but it seems to me that it's because the object being referenced is not a jQuery object, but something else (quite what I'm not sure). The code that the error is referencing is as follows:</p>
  
  <pre><code>  function add_image_to_gallery (guid, url, on_image_load) {
      var trs = $('.tabs-wrapper &gt; .user-images &gt; table &gt; tbody &gt; tr');
  
      $(trs).each(function () {
        var $tr = $(this);
        var $template = $tr.children('.zp-html-template');
  
        var $td = $template
                    .clone()
                    .removeClass('zp-html-template')
                    .insertAfter($template);
  
        // THE CODE BELOW IS THROWING THE ERRORS
        $td
          .children('.zetaprints-field')
          .attr('value', guid)
          .change({ zp: zp }, image_field_select_handler);
  
        $td
          .children('.image-edit-thumb')
          .click(thumbnail_edit_click_handler);
  
        var $thumb = $td.children('.image-edit-thumb');
  
        $thumb
          .find('&gt; .buttons-row &gt; .zp-delete-button')
          .click(delete_image_click_handle);
  
        var $img = $thumb
                     .children('img')
                     .attr('alt', guid)
                     .attr('src', url);
  
        if (on_image_load)
          $img.load(on_image_load);
      });
    }
  </code></pre>
  
  <p>(well a small snippet of the code, the file is over 1400 lines long)</p>
  
  <p>Can anybody see anything obviously wrong with the above code? Or does anybody have any idea what might be causing this?</p>