• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

How to Know Where Cursor is Positioned

 
Ranch Hand
Posts: 2165
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a page with two DIV tags on it(and upper section and lower section). I place a jsp in the lower section using jQuery load. When in the lower section I use the following code to keep up with the cursor so when mousedown is detected a third DIV tag is displayed at that point. This all works good except I tried to make the lower section DIV tag scrollable using overflow. Now my third DIV tag does not display at the cursor position it is offset usually lower. I figure it is the scrolling offset of the lower DIV tag but I have no idea how to compensate for this.


 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you putting the div inside of the layer that scrolls and not on the document level?

The div also has a scrollTop

Eric
 
Amateurs built google. Professionals built the titanic. We can't find the guy that built this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic