Popup positionTo not scrolling the page
I have a generated page with questions.When one or more questions is not answered, I want to position a popup just above the first non-answered question.
It works with a positionTo up to about '#uc5_UC'. When you set the target to a value that would require to scroll to get in to view after loading the page, the popup comes on the lowest element still visible without scrolling.
I tried to first force scroll the page with:
- $(document).on("pageshow", function (){
- $("html, body").scrollTop($("#uc10_UC").offset().top);
- $("#idMsg").popup("open", {positionTo: '#uc10_UC'});
- });
Now the popup shows on the right place, but after that the page is scrolled back to the top, so the popup is not in view.
Any ideas would be appreciated.
Pieter