Hello,
I currently have a a scrollable div that is populated dynamically.
I have a function that captures UpArrow and DownArrow keyPresses and changes the classes within the parent div to have one child selected at a time
(basically this mimics a select input)
Here is what I want to do: I need the div's viewable area to change (go down or up) to show the most recently "selected" child, but only if that child is not already in the viewable area of the parent.
So I need to obtain the viewable area in relation to the scrollHeight of the parent div somehow...but i am not sure how to do this...
Also, I am not sure how to set the viewable area of the parent div.
Any help would be greatly appreciated!