jQuery .is(":visible") works in Firefox but not Chrome
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/8337186/jquery-isvisible-not-working-in-chrome">jquery .is(&ldquo;:visible&rdquo;) not working in Chrome</a>  </p>
</blockquote>



<p>I am trying to get all of the visible items in an array. It's working fine in Firefox but not Chrome.</p>

<p>Here's my code:</p>

<pre><code>$.each (t.config.promoInput, function (i, v) {
    var size = 0;

    $.each ($(v).find('option'), function (i, v) {
        $(v).show() // Show all options in &lt;tt&gt;$(v)&lt;/tt&gt;.
            .not(':first-child') // Don't hide &lt;tt&gt;(All)&lt;/tt&gt;.
            .not(':Contains("' + t.config.searchSpanInput.val() + '")') // Don't hide options that match the searchCriteria.
            .hide(); // Hide everthing that doesn't match or isn't (All).

        if ($(v).is(":visible")) {
            size++;
        }
    });
});
</code></pre>

<p>In Firefox size increments, whereas Chrome size stays equal to 0.</p>

<p>EDIT: :Contains is my own addition to the jQuery library. It is a case-insensitive version of :contains.</p>
