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 4324120
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T09:05:22+00:00 2026-05-21T09:05:22+00:00

Can someone please take a look at the small test case below and tell

  • 0

Can someone please take a look at the small test case below and tell me why the div(.hide) is never visible in IE7 and IE6.

(N.B. I realise that jQuery’s hide() & show() methods could be used but I would prefer to use a CSS based solution that relies on classes rather than having jQuery writing inline styles to the DOM.)

<html>
<body>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
            $(document).ready(function() {
                $(function() {
                    $("table tr").hover(function() {
                        $(this).addClass("hover");
                    }, function() {
                        $(this).removeClass("hover");
                    });
                });
            });
    </script>

    <style type="text/css">
        .hide {
            visibility: hidden;
            display: block;
            width: 16px;
            height: 16px;
            background-color: #f00;
        }
        .hover .hide {
            visibility: visible;
        }
    </style>

    <table style="border-collapse:collapse;">
        <tr>
            <th class="ident" scope="col">Col1</th>
            <th class="fname" scope="col">Col2</th>
            <th class="lname" scope="col">Col3</th>
        </tr>
        <tr>
            <td>Content</td>
            <td>Content</td>
            <td><div class="hide"></div></td>
        </tr>
        <tr>
            <td>Content</td>
            <td>Content</td>
            <td><div class="hide"></div></td>
        </tr>
        <tr>
            <td>Content</td>
            <td>Content</td>
            <td><div class="hide"></div></td>
        </tr>

        <tr>
            <td>Content</td>
            <td>Content</td>
            <td><div class="hide"></div></td>
        </tr>
    </table>
</body>
</html>
  • 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-21T09:05:23+00:00Added an answer on May 21, 2026 at 9:05 am

    Not sure if this will fix your issue because I can’t actually replicate your problem (I only have IE7 via IE9 available to me), but try doing something like this instead:

    <html>
    <body>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>
        <script type="text/javascript">
                $(document).ready(function() {
                    $(function() {
                        $("table tr").hover(function() {
                           $(this).find('.redblock').toggleClass('show');
                        });
                    });
                });
        </script>
    
        <style type="text/css">
            .redblock{
                visibility: hidden;
                display: block;
                width: 16px;
                height: 16px;
                background-color: #f00;
            }
            .show {
                visibility: visible !important;
            }
        </style>
    
        <table style="border-collapse:collapse;">
            <tr>
                <th class="ident" scope="col">Col1</th>
                <th class="fname" scope="col">Col2</th>
                <th class="lname" scope="col">Col3</th>
            </tr>
            <tr>
                <td>Content</td>
                <td>Content</td>
                <td><div class="redblock"></div></td>
            </tr>
            <tr>
                <td>Content</td>
                <td>Content</td>
                <td><div class="redblock"></div></td>
            </tr>
            <tr>
                <td>Content</td>
                <td>Content</td>
                <td><div class="redblock"></div></td>
            </tr>
    
            <tr>
                <td>Content</td>
                <td>Content</td>
                <td><div class="redblock"></div></td>
            </tr>
        </table>
    </body>
    </html>
    

    The proof is in the fiddle: http://jsfiddle.net/HEkqq/7/

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

Sidebar

Related Questions

Can someone please tell me how this was done? Take a look at the
Could someone please take a look at the script below and tell me why
can someone take a look at this please http://jsfiddle.net/bloodygeese/ecscY/56/ it looks like I have
Please take a look at the test class below. I am trying to do
Please can someone take a look at the following image: http://img109.imageshack.us/img109/6885/colouring.png I need to
Can someone please take a look at these, it just is not happing for
Can someone please tell me what this means: 07-04 09:54:38.048: I/DetailActivity(15496): Title that is
Can someone please tell me why I'm getting the error object reference is required
Could someone please take a look and let me know what i'm doing wrong...
Please take a look at the code snippet below. I want the 2nd MongoDB

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.