jQuery if visible
<pre><code> &lt;div id="chatCenterMembers"&gt;
   &lt;div class="chatmember"&gt;
       &lt;a title="Blah Blah Blah"&gt;
          &lt;div class="newchatmessage" style="display: block;"&gt;&lt;/div&gt;
</code></pre>

<p>How can I capture the visible div in an if statement?</p>

<p>I have <code>$(this)</code> set to <code>&lt;div class="chatmember"&gt;</code> - second line from the top.</p>

<p>I've been working with below but had now luck so far.</p>

<pre><code>if($(this+' a div.newchatmessage').filter(":visible")) {
</code></pre>

<p>Above just drops out...</p>

<p>I've also tried below and it doesn't work either</p>

<pre><code>if ($(this + 'a div.newchatmessage').is(':visible')) {
</code></pre>
