:visible length returning 0 when item is visible
<p>I have an if statement to check if my div has nothing visible under it, and if so, I hide the siblings of the child element.</p>

<pre><code>        var $remainingprojects = $searchproject.show().filter(function () {
            var text = $(this).text().replace(/\s+/g, ' ').toLowerCase();
            return !~text.indexOf(val);
        }).parents('.srcprojects');

        var $remainingprojectscontainer = $remainingprojects.parents('.projectscontainer');

        $remainingprojects.hide();
        $remainingprojectscontainer.each(function() {
            if($(this).children('.srcprojects:visible').length == 0){//This line
                console.log($(this).children('.projectschildren').html());
                $(this).children('.projectschildren').hide();
                $(this).children('.projectschildren').siblings('.destarrow').hide();
                $(this).children('.projectschildren').siblings('.destproject').hide();
            }
        });
</code></pre>

<p>It seems to be working, but is still hiding the siblings of the child element for this one:</p>

<pre><code>&lt;div class="srcprojects" style=""&gt;&lt;/div&gt;
</code></pre>

<p>Everything else that fulfills this condition already has style set to <code>display:none;</code> as shown below:</p>

<pre><code>&lt;div class="srcprojects" style="display: none;"&gt;&lt;/div&gt;
</code></pre>

<p>I have multiple srcprojects under each container. Because it's a search, some or all will be hidden. What I want is for the siblings to be hidden if none of the srcprojects under the container are visible.</p>

<p>Edit: Added surrounding code for context.</p>
