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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:35:52+00:00 2026-05-24T22:35:52+00:00

I am trying to show a div when hovering over the first row of

  • 0

I am trying to show a div when hovering over the first row of a table. This results in flickering. How can I fix it?

    <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="hovermouse._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

    <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>

    <script type="text/javascript">


        $(document).ready(


function () {

    $("table tr:first").hover(function () {
        $("#mydiv").show()
    },
            function () {
                $("#mydiv").hide();
            }
            );
}
        );
    </script>

    <div id="mydiv">
        you can see me</div>

    <table border="true">
        <tr>
            <td>
                hi
            </td>
            <td>
                hi
            </td>
            <td>
                hi
            </td>
            <td>
                hi
            </td>
            <td>
                hi
            </td>
        </tr>
        <tr>
            <td>
                hi
            </td>
            <td>
                hi
            </td>
            <td>
                hi
            </td>
            <td>
                hi
            </td>
            <td>
                hi
            </td>
        </tr>
        <tr>
            <td>
                hi
            </td>
            <td>
                hi
            </td>
            <td>
                hi
            </td>
            <td>
                hi
            </td>
            <td>
                hi
            </td>
        </tr>
    </table>
</asp:Content>
  • 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-24T22:35:53+00:00Added an answer on May 24, 2026 at 10:35 pm

    Which browser? It will logically flicker because when you show the new <div> it will displace the <tr> being hovered over and the <tr> will no longer be hovered, resulting in an infinite loop. A lot of browsers don’t do this, they only apply hover effects when the mouse moves, but the mouse can still move a small amount and cause the flickering.

    The best thing to do here is to not do that. Ask yourself a few questions:

    1. Should the <div> actually be hidden when the user mouses off of the <tr>?
    2. What is the actual point of this code? What do you want to accomplish by this?
    3. Should the <div> actually displace the <tr>, or have you applied a stylesheet to override that? If you haven’t and this is what you mean to do, do so.

    Here’s the test case I put together from what you posted: http://jsfiddle.net/YKCA5/

    If you can provide a more complete example (e.g. applicable styles & other scripts) please do.

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

Sidebar

Related Questions

I am trying to show a div when the cursor hovers over and image
I'm trying to show a dialog (div) that's inside another div. This way, I
I am trying to work out how to show more divs when hovering over
I'm trying to do this without Jquery. I want to show a div when
Trying to show/hide severals divs using jquery after each news on my page. <div
I'm trying to use TIpsy http://plugins.jquery.com/project/tipsy to show usernames when hovering over linked images.
I'm trying to show a live table of contents in a separate div, based
I am trying to use jQuery to show a div when the user selects
I'm trying to create a standardized show/hide element system, like so: <div class=opener popup_1>Click
I'm trying to show a custom hint in a TWinControl but I can't figure

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.