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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:25:03+00:00 2026-06-13T15:25:03+00:00

I have a table with a menu hidden in a cell that that I

  • 0

I have a table with a menu hidden in a cell that that I expand using slideToggle(). This menu has a few <img> that onclick= call a function and passed the element and a number. Now I’m trying to get the position of the element that made the call so I can dynamically create an overlay <div>. The problem is that I am not getting the position values and I don’t know why. HERE is a small example of what I am trying to do. Can anyone help?

  • 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-13T15:25:04+00:00Added an answer on June 13, 2026 at 3:25 pm

    I believe the issue is your use of $(this). You are passing the element that was clicked into your function so you need to use that instead. I have also updated your alert to explicitly output the left offset as offset would just return an object. You could instead use console.log to be able to inspect the returned object (in a browser like chrome):

    window.somefunc = function(el,id){
        var pos = $(el).offset();
        alert(pos.left);
    }
    

    I have updated your JSFiddle here: http://jsfiddle.net/gRfnb/22/

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

Sidebar

Related Questions

I am using a table navigation menu in my website in that i have
i have table unser it i have one td with elemets inside the menu
I have 11 records in the Menu table, only 1 with a PageID set
Hi i have a table strcture for my menu, and i need to be
I have some simple markup: <table> <tr> <td>Menu Item</td> </tr> </table> <div> <table> <tr>
So I have this code here: <table> <tr> <td width=200px valign=top> <div class=left_menu> <div
I have table with around 70 000 rows. There is 6000 rows that i
I have table and this table contain result column with some entries. I just
I have table with 300 000 records (MyISAM). I get record from this table
I have a a mysql table that I can't access, I get the following

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.