How to scroll in inactive page from code?

How to scroll in inactive page from code?

I have multipage jQuery Mobile app. First page contains container div with number of child divs, which can be scrolled programmatically using .scrollLeft(...). Now when user navigates to second page and want to go back to first page, I need to scroll container programmatically before he can see first page. This doesn't happen, because container scrollWidth is 0, while the page with that container is not an active page. Question - how to scroll divs in inactive page from code?

This is sample code to demonstrate the problem

https://codepen.io/pashkatarakashka/pen/YVXQLz

Basically if you try to scroll container from the second page, it will not scroll.