• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Know Where Cursor is Positioned

 
Steve Dyke
Ranch Hand
Posts: 1678
1
  • Mark post as helpful
  • send pies
  • 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.


 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic