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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:42:57+00:00 2026-05-22T14:42:57+00:00

I am trying to make a tool tip, I have the following html code:

  • 0

I am trying to make a tool tip, I have the following html code:

<img src="url here" class="tooltip" alt="sometext here"/><br>
<img src="url here" class="tooltip" alt="sometext here"/>

and I have the following Jquery code:

toolTip = function(){
     jQuery('<span class="tip"></span>').prependTo('body').hide();
     showTooltip = function(event){
         $thisTxt = jQuery(this).attr('alt');
         var tPosX = event.pageX - 5;
         var tPosY = event.pageY +20;
         jQuery('.tip').text($thisTxt).css({top:tPosY, left:tPosX}).fadeIn();
     };
     hideTooltip = function(){
         jQuery('.tip').fadeOut();
     };
     jQuery('.tooltip').hover(showTooltip , hideTooltip);
 };

jQuery(document).ready(function(){
     toolTip();
});

Everything looks fine to me. but the tooltip does not flow above the img, instead, it always stay on left top of the window. I searched other posts, they suggest the position should be absolute. and I change the tip css to

 jQuery('.tip').text($thisTxt)
               .css({top:tPosY, left:tPosX, position:"absolute" })
               .fadeIn();

But then the tip does not appear at all. It is very weired. any tips on this problem would be appreciated.

  • 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-22T14:42:58+00:00Added an answer on May 22, 2026 at 2:42 pm

    That should be position: "absolute" – note the quotes. You may want to see the working example.

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

Sidebar

Related Questions

Here's the problem: I'm trying to make a small reporting tool. So... I have
I am trying to make a jquery tool tip to open up a link
I am trying to make a simple tool tip function (I'm trying to learn
I'm trying to make a small tool that makes use of the Debugger Engine
Trying to make a MySQL-based application support MS SQL, I ran into the following
I am trying to make use of qTip JQuery plugin . I have tried
I'm trying to make a jquery tooltip that appears when a user mouses over
I'm trying to make a page inspection tool, where: The whole page is shaded
I'm trying to make use of Eclipse to be my primary tool for making
I'm trying to make Zend's command line tool to work in Aptana's terminal view

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.