Jquery hide() all elements with certain class except one
<pre><code>&lt;div class='hide'&gt;A&lt;/div&gt;
&lt;div class='hide'&gt;B&lt;/div&gt;
&lt;div class='hide' id='1'&gt;C&lt;/div&gt;
</code></pre>

<p>I have a funtion called showOne which should hide all elements and then show the one with id='1'.</p>

<pre><code>funtion showOne(id) {
// Hide all elements with class = 'hide'
$('#'+id).show();
}
</code></pre>

<p>How do I hide all elements with class = 'hide' in jquery?</p>
