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

  • Home
  • SEARCH
  • 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 7952251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:48:14+00:00 2026-06-04T02:48:14+00:00

Here is what I want to implement: I have two hyperlinks that are displayed

  • 0

Here is what I want to implement:

I have two hyperlinks that are displayed on the webpage:

<a href="http://foo.com"> foo </a>

<a href="http://bar.com"> bar </a>

and I also have two descriptions to the links as divs:

<div id="foo">foo means foo</div>

<div id="bar">bar means bar</div>

Now, when I mouse over the link of foo, the corresponding description div should pop up, and it should pop up right next to where my cursor is.

So if I mouse over “foo”, a pop-up box containing “foo means foo” should appear right next to the mouse cursor. Same thing applies to “bar”.

Please show a quick and simple way to implement this, with javascript/jquery, CSS, or combination of these.

P.S. I apologize for didn’t explain clearly earlier, I actually want to add further links or images into the description div instead of pure text so a regular tool-tip perhaps would not do.

Thanks.

  • 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-04T02:48:15+00:00Added an answer on June 4, 2026 at 2:48 am

    Here is the simpliest solution.

    HTML:

    <a href="http://foo.com" data-tooltip="#foo">foo</a>
    <a href="http://bar.com" data-tooltip="#bar">bar</a>
    
    <div id="foo">foo means foo</div>
    <div id="bar">bar means bar</div>
    

    CSS:

    div {
        position: absolute;
        display: none;
        ...
    }​
    

    JavaScript:

    $("a").hover(function(e) {
        $($(this).data("tooltip")).css({
            left: e.pageX + 1,
            top: e.pageY + 1
        }).stop().show(100);
    }, function() {
        $($(this).data("tooltip")).hide();
    });
    
    $("a").hover(function(e) {
      $($(this).data("tooltip")).css({
        left: e.pageX + 1,
        top: e.pageY + 1
      }).stop().show(100);
    }, function() {
      $($(this).data("tooltip")).hide();
    });
    div {
      position: absolute;
      display: none;
      border: 1px solid green;
      padding:5px 15px;
      border-radius: 15px;
      background-color: lavender;
    }
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
    
    <a href="http://foo.com" data-tooltip="#foo">foo</a>
    <a href="http://bar.com" data-tooltip="#bar">bar</a>
    
    <div id="foo">foo means foo</div>
    <div id="bar">bar means bar</div>

    ​DEMO: http://jsfiddle.net/8UkHn/

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

Sidebar

Related Questions

I want to implement a ContentProvider that manipulates multiple tables. Here is what I
Here's the situation. I have a bunch of objects that implement Serializable that I
i need to implement this scenario Brief about that is have two java based
I have two examples to show you what I want to achieve here. But
I want to implement the solution using the pre-processor described here: Reuse define statement
for iOS 5.0 using ARC, here is something I want to implement and need
Here i want to do UDP Socket programming in C. I have one device
I want to implement search bar in my application which will filter list view
I seemingly have two choices: Make my class implement IDisposable . Create my DbCommand
I have two arrays which contain objects of assets, now I want to subtract

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.