title: jQuery add method to object, then trigger event on it
body: <p>Consider following situation:<br />
  I have a jQuery Object, <code>$wrapper = $(this);</code>. This happens in a init call, like this <code>$('#unique-wrapper-id').initWrapper()'</code>. As you can already imagine <code>initWrapper()</code> is a function in <code>jQuery.fn</code>.</p>
  <p>Now, still in the <code>initWrapper()</code> call I add a function to <code>$wrapper</code> like this</p>
  <p><code>$wrapper.getValue = function() { /* typical wrapper function */}</code></p>
  <p>and then, in a callback which is executed upon clicking on an element within the wrapper I call <code>$wrapper.trigger('change')</code>.
  On the other end I listen to the regular jQuery change event and here's where it doesn't work out anymore.</p>
  <pre><code>$('#unique-wrapper-id').change(function() {
      var $wrapper = $(this);
      $wrapper.getValue(); // $wrapper.getValue() is not a function
  });
  </code></pre>
  <p>Ok, so somewhere in the jQuery change event process <code>getValue()</code> gets lost. No problem, I'll just attach it to the DOMElement itself in the init call with</p>
  <p><code>$wrapper[0].getValue = function { /* typical wrapper function */ }</code></p>
  <p>This works as expected and I can execute the <code>getValue()</code> method on the DOMElement behind the jQuery Object on the listening end.</p>
  <p>However, there are two things that bug me:</p>
  <ul>
  <li>Why does <code>getValue()</code> on the jQuery object get lost during the change event process?</li>
  <li>Why doesn't the jQuery constructor (<code>var $wrapper = $(this);</code>) copy the <code>getValue()</code> function of the DOMElement into the jQuery Object?</li>
  </ul>