J
Jedrin
I have a div with a table in it as shown below. The 'overflow: auto'
causes the table to appear in it's own little scrolled area with a
scroll bar as we want since it is very large. However when a mouse
down event occurs, we want to know the position of the mouse relative
to the table in it's scrolled area. I'm not sure how this can be
done ? I know there is clientX,clientY and pageX,pageY as well as
window.pageXOffset. But the later is for scrolling of the whole page
and not the scrolled area. What to try ?
.grid_overflow_class {
width: 100%;
overflow: auto;
}
<div class='grid_overflow_class'>
<table>
...
....
etc ..
</table>
</div>
causes the table to appear in it's own little scrolled area with a
scroll bar as we want since it is very large. However when a mouse
down event occurs, we want to know the position of the mouse relative
to the table in it's scrolled area. I'm not sure how this can be
done ? I know there is clientX,clientY and pageX,pageY as well as
window.pageXOffset. But the later is for scrolling of the whole page
and not the scrolled area. What to try ?
.grid_overflow_class {
width: 100%;
overflow: auto;
}
<div class='grid_overflow_class'>
<table>
...
....
etc ..
</table>
</div>