Multiple condition selector in jQuery
<p>I have the following code, and I want to select the element with type = text and id of 'announcement_date'. How would I do this in jQuery? Note that both the elements have same id. This is in a legacy classic ASP page I am working with.</p>

<pre><code>&lt;input type="hidden" name="announcement_date" id="announcement_date" value="1111"&gt;&lt;/input&gt;
&lt;input type="text" name="announcement_date" id="announcement_date" value="323"&gt;&lt;/input&gt;
&lt;input type="text" name="eff_date" id="eff_date" value="123"&gt;&lt;/input&gt;
&lt;input type="text" name="end_date" id="end_date" value="123"&gt;&lt;/input&gt;
</code></pre>

<p>I tried the selector below, but it fails to select the correct element.</p>

<pre><code>$("#announcement_date type=text").addClass("error");
</code></pre>
