title: Refining ui.resizable to provide a reset method
body: <p>I have a use case where I need to reset the size of a textarea to it's initial size. I started from <a href="https://stackoverflow.com/questions/7506104/jquery-ui-resizable-set-size-programmatically#answer-18632191">this solution</a>, which resets when set an option, and arrived at this:</p>
  
  <pre><code>$.widget("ui.resizable", $.ui.resizable, {
      options: {
          origWidth: 0,
          origHeight: 0
      },
  
      _create: function() {
          this._super();
          this.options.origWidth = $(this.element).width();
          this.options.origHeight = $(this.element).height();
      },
  
      reset: function() {
          this._resize(
              this.options.origWidth,
              this.options.origHeight
          );
      },
  
      _resize: function(width, height) {
          width != null &amp;&amp; $(this.element).width(width);
          height != null &amp;&amp; $(this.element).height(height);
          this._proportionallyResize();
      }
  });
  </code></pre>
  
  <p>I'm using it with this setup:</p>
  
  <h3>css</h3>
  
  <pre><code>#textarea-resizer { width: 200px; }
  #textarea { width: 100%; height: 100%; overflow: auto; resize: none; }
  </code></pre>
  
  <h3>html</h3>
  
  <pre><code>&lt;div id="textarea-resizer" style="width: 175px"&gt;
    &lt;textarea id="textarea"&gt;&lt;/textarea&gt;
  &lt;/div&gt;
  
  &lt;input type="button" id="reset" value="Reset" /&gt;
  </code></pre>
  
  <h3>js</h3>
  
  <pre><code>$('#textarea-resizer').resizable({
      handles: "se",
      alsoResize: '#textarea',
      minHeight: 23,
      minWidth: 175
  });
  
  $('#reset').click(function() {
      $('#textarea-resizer').resizable('reset');
  });
  </code></pre>
  
  <p>(The reason for the "alsoResize" is that the ui.resizable do funny things to textarea elements)</p>
  
  <p>The problem is that pressing the "Reset" button changes the #textarea-resizer, but not the #textarea. How can I make this work correctly? Also, should I do something more to make it fit in well with how the Resizable works?</p>