You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have three DIV's. Scrollintoview is used to scroll to DIV 3, that is inside DIV 2. This works. However, DIV 2 is inside DIV 1, and the part where DIV 3 is visible is not into view from the viewpoint of DIV 1. So I have to scroll down DIV 1 (which is the actually the body of my document) to get DIV 3 visible. Is there a way to also scroll the DIV 1 automatically so DIV 3 becomes visible?
The text was updated successfully, but these errors were encountered:
First of all if you have scrollable inside scrollable you may have a usability problem. That's why I didn't implement nested plugin. First of all it would be much more complex to make (under particular circumstances) and second of all I would rather encourage developers to rethink their UI.
but apart from this and depending on your particular situation, you may call scrollintoview twice:
on div2 which scrolls it into view within div1
and then on div3 which scrolls it into view within div2
This will work if div2 is smaller in size than div1 otherwise some part of the scrolled-in element may still be beyond visible viewport and scrolling the third element within that one may still render it beyond visible part.
As mentioned: rethink your UI because even without any automated scrolling users are likely frustrated by this double deep scrolling which makes it pretty hard to find what they're looking for.
I have three DIV's. Scrollintoview is used to scroll to DIV 3, that is inside DIV 2. This works. However, DIV 2 is inside DIV 1, and the part where DIV 3 is visible is not into view from the viewpoint of DIV 1. So I have to scroll down DIV 1 (which is the actually the body of my document) to get DIV 3 visible. Is there a way to also scroll the DIV 1 automatically so DIV 3 becomes visible?
The text was updated successfully, but these errors were encountered: