title: jQuery selector for selecting an input field with a class
body: <p>I have </p>
  
  <pre><code>&lt;input type="text" class="required" value="XXX" name="abc"&gt;
  &lt;input type="hidden" class="required" value="XXX" name="abcd"&gt;
  &lt;input type="text" class="required" value="XXX" name="abcef"&gt;
  </code></pre>
  
  <p>i have many input fields like this.</p>
  
  <p>i need a jQuery selector where i can select a text field whose class is required </p>
  
  <p>right now to select textfield i use $(':input[type="text"]') </p>
  
  <p>how do i also put a condition to select class="required."</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>so say now i have the following input fields</p>
  
  <pre><code>&lt;div id="validate_info"&gt;
  &lt;input type="text" class="required" value="XXX" name="abc"&gt;
  &lt;input type="hidden" class="required" value="XXX" name="abcd"&gt;
  &lt;input type="text" class="required" value="XXX" name="abcef"&gt;
  &lt;input type="password" class="required" value="XXX" name="abcefg"&gt;
  &lt;input type="text"  value="XXX" name="abcefgsa"&gt;
  &lt;input type="password" value="XXX" name="abcsaefg"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>i need one selector that can select all type="text", type="password" which has class="required"
  i tried </p>
  
  <pre><code>$('#validate_info $("input.required").filter("[type="password"],[type="text"]")');
  </code></pre>
  
  <p>but this doesnt seem to work.</p>