This is a follow-up question to this SO question.
I have a new requirement where I need to add an input field to the top of the panel. So I would like $.scrollTo to affect #myContent instead of #myPanel .ui-panel-inner.
Here's the fiddle. You can see that the input field scrolls off the screen.
I thought I would try adding a div around the content:
$(document).on("pagebeforeshow", "#page1", function(){
$('#myPanel').on('panelopen',PanelOpen);
});
function PanelOpen(myEvent, myUI ) {
$("#myContent").scrollTo('#ID498',1000)
}
But it doesn't work.