title: removing input values when element is hidden using jquery
body: <p>I have an div element</p>
  
  <pre><code>&lt;div id=form&gt;&lt;form id="formstuff"&gt;form input stuff&lt;/div&gt;&lt;/div&gt;
  </code></pre>
  
  <p>that shows/hides (or toggles) when users clicks on another element</p>
  
  <pre><code>&lt;div id="close"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>If <code>#form</code> is shown and user decides to input values, but suddenly decides to just click on the <code>#close</code> button to close the <code>#form</code> element without deleting the values. How would you delete all input values when the user decides to close <code>#form</code> or hide()?</p>
  
  <p>Is the only way to do something like <code>$(this).val('');</code> Or is there something like <code>.empty();</code> but I don't want to remove style and such, just the text.</p>