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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:37:47+00:00 2026-06-01T23:37:47+00:00

I have the following code. When I mouse over the CODE it should show

  • 0

I have the following code. When I mouse over the “CODE” it should show the div on position 100 X100. It is working fine in IE and Chrome; however the div does not move to the required position in Firefox. What need to be changed in order to make it working?

Note: I am using the following code for positioning the div

$('#tooltip').css({ left: 100 + "px", top: 100 + "px", position: "absolute" })

–Complete Code —

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>

<title>Test</title>

<style type="text/css">

    .tooltip

    {

        background-color: Orange;

        position: absolute;

        border-style: solid;

        border-width: 2px;

        border-bottom: solid 2px black;

    }

</style>

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

<script type="text/javascript">





    function showDiv(batchId, vendorId) {



        tooltip.style.display = "block";

        batch.innerHTML = batchId;

        vendor.innerHTML = vendorId;

        $('#tooltip').css({ left: 100 + "px", top: 100 + "px", position: "absolute" })

    }



</script>

</head>

<body>

<div>

    <div>

        <table cellspacing="0" rules="all" border="1" id="MainContent_grdTooltip" style="border-collapse: collapse;">

            <tr>

                <th scope="col">MainID</th>

                <th scope="col">SecondID</th>

                <th scope="col">CODE</th>

            </tr>

            <tr>

                <td>101</td>

                <td>999999991</td>

                <td onmouseover="showDiv(101,999999991)">55789</td>

            </tr>

        </table>

    </div>

    <div id="tooltip" class="tooltip">

        <table>

            <tr>

                <td>Main Id:</td>

                <td id="batch"></td>

            </tr>

            <tr>

                <td>Second Id:</td>

                <td id="vendor"></td>

            </tr>

        </table>

    </div>

</div>

</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-06-01T23:37:49+00:00Added an answer on June 1, 2026 at 11:37 pm

    Here is a jsfiddle that demonstrates your code.

    http://jsfiddle.net/6GaEA/1/

    The problem (according to firebug) lies in your script. You reference a variable ‘tooltip’ that’s not defined. Chrome and IE seem to swallow this error and continue, while firefox chokes and dies.

    change this:

     function showDiv(batchId, vendorId) {
    
        tooltip.style.display = "block";
    
        batch.innerHTML = batchId;
    
        vendor.innerHTML = vendorId;
    
        $('#tooltip').css({ left: 100 + "px", top: 100 + "px", position: "absolute" })
    
    } 
    

    to this:

    function showDiv(batchId, vendorId) {
    
        $('#tooltip').css('display',"block");
    
        $('#batch').html(batchId);
    
        $('#vendor').html(vendorId);
    
        $('#tooltip').css({ left: 100 + "px", top: 100 + "px", position: "absolute" })
    
    }
    

    edit: I am aware that the jQuery css function is called on $(“#tooltip”) twice. I was trying to keep the same flow of the code as much as possible 🙂

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

Sidebar

Related Questions

i have following code to show div on page <div id=all_users> <div id=user11 userid=11
I use the following code to slide out a div on a mouse-over, wait
I have a following code $(document).ready(function(){ //When mouse rolls over $(#nav #nav_li).mouseover(function(){ $(this).stop().animate({height:'140px', width:'182px'},{queue:false,
I have following code: <div class='parent'> <div class='left-child'></div> <div class=right-child></div> </div> What I want
I have the following jQuery code to replace an image when you hover over
After some reading from this tutorial , I have the following partly working code:
I have the following code <div class=item id=item1>Text Goes Here</div> <div class=admin_tools id=tools1>Link 1
I have the following code for a selectable tab: <div class=tabOff> <div class=lightCorner TL></div><div
The following code shows how you can have text truncated by a div with
I have the following code which toggles the visibility of a div when another

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.