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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:06:22+00:00 2026-06-01T22:06:22+00:00

I want to add a tooltip with dinamic position change. This is js code:

  • 0

I want to add a tooltip with dinamic position change. This is js code:

$('a[rel=tooltip]').mouseover(function(e) {
        //Grab the title attribute's value and assign it to a variable
        var tip = $(this).attr('title');    
        //Remove the title attribute's to avoid the native tooltip from the browser
        $(this).attr('title','');   
        //Append the tooltip template and its value
        $(this).append('<div id="tooltip"><div class="tipHeader"></div><div class="tipBody">' + tip + '</div></div>');//Show the tooltip with faceIn effect
        $('#tooltip').fadeIn('500');
        $('#tooltip').fadeTo('10',0.9);
    }).mousemove(function(e) {
        //Keep changing the X and Y axis for the tooltip, thus, the tooltip move along with the mouse
        $('#tooltip').css('top', e.pageY + 10 );
        $('#tooltip').css('left', e.pageX + 20 );
    }).mouseout(function() {
        //Put back the title attribute's value
        $(this).attr('title',$('.tipBody').html());
        //Remove the appended tooltip template
        $(this).children('div#tooltip').remove();
    });

My page: http://pododezhdoy.ru/catalog/women/nizhnee_bele/

Problem: Why script determine wrong postion?

  • 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-01T22:06:23+00:00Added an answer on June 1, 2026 at 10:06 pm

    What position should be right? This a code shows the tooltip above the image.

        var itempos = $(this).parent().position();
        $('#tooltip').css('top', itempos.top + 'px' );
        $('#tooltip').css('left', itempos.left + 'px' );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

$(document).ready(function() { $(#demo img[title]).tooltip({effect: 'slide'}); }); I want to add an offset to this
Hi, I'm trying to add a title attribute to the input element created this
I want add my custom sidebar next right column all page. Please check this
I want to add a tooltip to the DateTimePicker Calendar that show some informations
I wrote this quick tooltip function for my links: $(function() { $('a').hover(function(e) { var
I want to add a ToolTip to TreeView nodes and make a balloon appear
I'm following this tutorial to add a simple jquery tooltip. The tutorial uses three
I want to call a javascript function from my ASP.NET (C#) code, I want
I want to add a tooltip using ToolTip class on a column of a
I want to add a specific behavior to multiple forms. In this case its

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.