Does this code do anything?
<p>I found this little bit of code in a project:</p>

<pre><code>if ($(".c1 .c2").is(":hidden")){
    $(".c1").hide();
} else {
    $(".c1").show();
}
</code></pre>

<p>It seems quite tautological to me, since it semme to hide something if it hidden, or show it otehrwise. The only thing is the difference in selectors used, so there is some possible side effect. Changing it:</p>

<pre><code>if ($(".c1").is(":hidden")){
    $(".c1").hide();
} else {
    $(".c1").show();
}
</code></pre>

<p>it would really do nothing, right?</p>

<p>Related HTML is as follow:</p>

<pre><code>&lt;span class="c1"&gt;
  &lt;span&gt;  &lt;/span&gt;
  &lt;span class="c2"&gt; &lt;/span&gt;
&lt;/span&gt;
</code></pre>

<p>CSS as follow</p>

<pre><code>.c1{ display: none; }
</code></pre>
