Coding⏱️ 2 min read📅 2026-05-31

How to Fix: jQuery `.is(":visible")` not working in Chrome

jQuery .is(':visible') not working in Chrome due to CSS display property, try setting display: block or inline-block on :not(:visible) elements.

Quick Answer: Try adding !important to your CSS rule for :not(:visible) elements, e.g. .hidden { display: none !important; }

The jQuery `.is(:visible)` method is not working in Chrome because of a bug in the browser's CSS parser. This issue is known to affect Chrome versions prior to 60.

🛑 Root Causes of the Error

  • The issue is caused by a CSS parser bug in Chrome that prevents it from correctly parsing CSS selectors with colons (:) as part of the selector.

✅ Best Solutions to Fix It

Method 1: Using a Different jQuery Method

  1. Step 1: Replace the `.is(:visible)` method with the `show()` and `hide()` methods.

Method 2: Using a CSS Selector Alternative

  1. Step 1: Replace the `.is(:visible)` method with the `display()` property and a conditional statement to check if the element is visible.

✨ Wrapping Up

By following these methods, you should be able to fix the issue and get your jQuery `.is(:visible)` method working in Chrome.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions