AutoFill 2.1.2 - How to get the the offset value with scrollX enabled.
AutoFill 2.1.2 - How to get the the offset value with scrollX enabled.
in AutoFill
I upgraded to Autofill 2.1.2 and dataTables 1.10.12 and that resolved an issue I had with the position of the handle not taking into account the offset or scrollX value - Thank You!
However, is there a mechanism to obtain the offset value of the scrollX of the scroll body? Upon clicking a cell, I overlay an input box and it's getting positioned incorrectly because I cannot figure out how to adjust for the scrollX value when it's not zero. I'm not sure which element I should be considering for the offset or if there's a built in function that can provide that value.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
There isn't any built in method for that in DataTables. But you should be able to use jQuery to do it. Something like
$('div.dataTables_scrollBody').scrollTop().Allan
Thanks Allen, after reviewing your answer I used editEvent.offsetparent().scrollLeft() where editEvent is the parent of the click event, and it all seems to render correctly now.