How add a constraint on find()?
<p>The following opens the first tab upon document being ready.
I simply want to keep this functionality but would like to add a constraint:
if the parent Li class is hidden, don't do it.  If this is too complex, I could also add a class to <code>&lt;a/&gt;</code> and say if it is of this type then don't do it.</p>

<pre><code>&lt;ul id="attached_deals_tab" class="nav nav-tabs"&gt;
   &lt;input id="id_deals-0-id" type="hidden" name="deals-0-id"&gt;
   &lt;li class="hidden"&gt;
       &lt;a data-toggle="tab" href="#X"&gt;X&lt;/a&gt;
    &lt;/li&gt;
&lt;/ul&gt;


$('#attached_deals_tab').find('a:first').tab('show');
</code></pre>

<p>Would that be even possible?</p>
