Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1092397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:40:34+00:00 2026-05-16T23:40:34+00:00

jQuery’s :visible selector seems not to work on TR elements in Internet Explorer 8

  • 0

jQuery’s :visible selector seems not to work on TR elements in Internet Explorer 8 in the sense that includes TRs that have been hidden with hide(). Here is a test case:

<html>
  <head>
    <script language="JavaScript" src="jquery-1.3.2.min.js"></script>
    <script language="JavaScript">
$(document).ready(function () { 
               $('#trb').hide();
               $('#trcount').html($('tr:visible').length);
               $('#pb').hide();
               $('#pcount').html($('p.item:visible').length);
});
    </script>
  </head>
  <body>
    <table>
      <tr><td>A</td></tr>
      <tr id="trb"><td>B</td></tr>
      <tr><td>C</td></tr>
    </table>
    <p><span id="trcount">?</span> rows are visible.</p>

    <p>Using paragraphs:</p>
    <p class="item">A</p>
    <p class="item" id="pb">B</p>
    <p class="item">C</p>

    <p><span id="pcount">?</span> paragraphs are visible.</p>
  </body>
</html>

On Chrome, it results in “2 rows are visible” and “2 paragraphs are visible,” as expected. On Internet Explorer 8, however, the result is “3 rows are visible” and “2 paragraphs” are visible.

Why? And what is the best way to work around it? (The best I can think of it to add a CSS class when I hide an item.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T23:40:35+00:00Added an answer on May 16, 2026 at 11:40 pm

    This is a bug with jQuery 1.3.2. To solve the problem use jQuery 1.4.2.

    To observe the difference compare these two jsFiddles in IE 8:

    jQuery 1.4.2 – no problems
    alt text

    jQuery 1.3.2 – “3 rows visible”
    alt text

    As Patrick DW points out in the comments, this answer points out the specific bug. There’s an answer in that same thread that seems to imply that using not:(:hidden) would solve the problem in 1.3.2, but it doesn’t.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Jquery does not work on the Internet explorer . However it runs on other
jQuery UI seems to be sensitive to the attributes of the elements that compose
jQuery 1.7.1 - I have an array of input text elements (class - pr)
jQuery's effects are great, but I've noticed that the remaining elements under the affected
jQuery(a).not(div#mnuMain a).live(click, function(event){ event.preventDefault(); alert(yes I got u); }); How to make it work?
Jquery did not carry out!!!I don't know why $(.other-edithion).click(function(){ var city = $(this).closest('#city'); if
I have a jquery bug and I've been looking for hours now, I can't
jQuery 1.7.1 - I'm using jQuery tabs widget in my JSP and have the
jQuery's deferred's have never liked me, and I've never been fully able to understand
jquery attaches a click method on even things that aren't typically clickable like a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.