How to make jQuery work with invalid HTML containing duplicate IDs?
<p>I have an old project that does contain HTML with duplicate IDs.  Switching selectors from ids to classes needs a lot of work, Can I do it with the JQuery, specially that I know how many divs I'll hide. </p>

<pre><code>&lt;div id="d"&gt;&lt;/div&gt;
&lt;div id="d"&gt;&lt;/div&gt;
&lt;div id="d"&gt;&lt;/div&gt;
</code></pre>

<p>I want to hide them all using a single action : </p>

<pre><code>$('#d').hide(); 
</code></pre>

<p>but it hides the first div only.</p>
