title: JQuery set textbox collection to empty value
body: <p>How do i go about emptying the values of textboxes here is below code i h've worked out but doesn't seem to work </p>
  
  <pre><code>var txtName = $("input#txtName"),txtPrice = $("input#txtPrice");
  </code></pre>
  
  <h3>First Method</h3>
  
  <pre><code>$(txtName,txtPrice).val("");
  </code></pre>
  
  <ul>
  <li>this is actually wrong because the price textbox would now become the context to search within i suppose.</li>
  </ul>
  
  <h3>Second Method</h3>
  
  <pre><code>$([txtName,txtPrice]).val("");
  </code></pre>
  
  <ul>
  <li>I don't understand why i should do this as they are already jQuery Objects(But works)</li>
  </ul>
  
  <p>I Put them in variables as these are used further in the script.</p>