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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:29:56+00:00 2026-06-01T11:29:56+00:00

I have a big <div /> container that has an image as a background.

  • 0

I have a big <div /> container that has an image as a background. When the user moves the cursor over that element I need to show an another <div /> that has information. I want this second one relative to the position of the cursor.

This is how far I am, I don’t know how to exactly fit it on the mouse pointer: http://jsfiddle.net/cyX2m/

Updated: The problem is the position, not the event.

Thank you in advance!

  • 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-01T11:29:58+00:00Added an answer on June 1, 2026 at 11:29 am

    First, you just need to change event from mouseover to mousemove. Then you need to subtract the position of the element firing the event from the PageX/Y:

    $("#big-area").bind("mousemove", function(e) {
        var x = e.pageX - this.offsetLeft;
        var y = e.pageY - this.offsetTop;
    
        $("#data").html('e.pageY: ' + y + ', e.pageX: ' + x);
    
        $("#helper").css('top', y).css('left', x).show();
    });
    

    Updated fiddle

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

Sidebar

Related Questions

I have a <div> element with position: absolute and z-index something big. I would
I have big element at the top of the webpage that sides down with
I have a simple setup with one big image container and 3 smaller thumbnail
I have a big image, and some text that I would like to lay
I have a div. When there is a big text then scroller comes on
I have big system that make my system crash hard. When I boot up,
I have big problem when I am trying to deploy my app over clickonce.
I have three divs with the following css: div#container { width: 780px; } div#photos
So i have the following structure <div id=container> <div id=head></div> <div id=body></div> <div id=foot></div>
I have the following code: <div id=container> <div id=top>TOP TEXT </div> <div id=middle>MIDDLE TEXT

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.