I am working on a single-page website that contains numerous containers.
Each container's content is loaded dynamically via ajax, so they may not all be populated at the same time.
These containers have variable heights set to auto.
The website utilizes an advanced routing system that allows it to scroll to a specific element upon loading a designated URL.
My challenge is how to scroll to a particular container (e.g. container 5) and maintain its position while other containers are still loading. Currently, the scroll position changes whenever any of the containers load or update.
Is there a plugin or effective method to address this issue?
To see an example of the problem: http://jsfiddle.net/b6sno9cv/
// Global variable to define start-container:
var initialWidgetIdx = 10;
Desired outcome:
Scroll to container 10 and maintain that position (scrolling remains focused on this container), even while other containers are still being loaded.
(Once all containers are fully loaded and have fixed heights, the scrolling functions correctly without any issues)