可能性の重複Chromeはない:私は配列に見えるすべてのアイテムを取得しようとしています
jquery .is(“:visible”) not working in ChromejQueryの.is( "可視")は、Firefoxで動作しますが、
を。 Firefoxではうまくいきましたが、Chromeではうまくいきません。クロムサイズが0
EDITに等しいままのに対し、Firefoxのサイズ単位で
$.each (t.config.promoInput, function (i, v) {
var size = 0;
$.each ($(v).find('option'), function (i, v) {
$(v).show() // Show all options in <tt>$(v)</tt>.
.not(':first-child') // Don't hide <tt>(All)</tt>.
.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++;
}
});
});
:
は、ここに私のコードです:jQueryライブラリに自分以外で含まれています。これは大文字と小文字を区別しない:containsを含んでいます。
HTMLの外観はどうですか? – Pointy
両方の 'each'コードブロックを閉じる必要があることに注意してください。 –
また、私はよく分かりませんが、ネストされた関数で参照するiとvは親スコープのものにアクセスするので、 –