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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:32:33+00:00 2026-05-23T15:32:33+00:00

I need a popup div that will appear right below the anchor that i

  • 0

I need a popup div that will appear right below the anchor that i clicked. Now, I want to determine the x and y coordinates onClick event of an anchor. What’s the best practice of doing it? What are the advisable event properties to use?

  • 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-23T15:32:33+00:00Added an answer on May 23, 2026 at 3:32 pm

    offsetX and offsetY are relative to the parent container, whereas pageX and pageY are relative to the document. Don’t confuse this with .offset() and .position(), in which .offset() is relative to the document and .position() is relative to the parent container’s .offset().

    Something like this example should work (JQuery):

    $('a').click(function(){
        var offset = $(this).offset();
        $('#popup_div').css('top',offset.top + 'px').css('left',offset.left + 'px').show();
    });
    

    http://api.jquery.com/offset/

    http://api.jquery.com/position/

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

Sidebar

Related Questions

I need a jquery slideshow with div popup i want to show my image
In my button click i had a popup div and inside that i need
I need assistance with creating a jquery function that will display a popup message
I like to have a popup modal dialog that need to show the list
I'm at a loss. Right now my site will redirect to a logon page
I have a div box (black) that will display a few different product images
I need to resize a div shown as a message in blockUI so that
I have a scrollable area that contains popup menus. Conceptually, something like this: <div
I need to show a popup window before a query execution, show the time
I need to replace our Ajax Modal Popup controls with a JavaScript equivalent. We

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.