I use jqtouch and iscroll for my app. I load all pages with ajax and when I go back from a ajax loaded 开发者_开发问答page to the index (menulist) page, that page scrolls to the top. How can I prevent this? Thanks.
have you tried to set the option checkDOMChanges to false?
I believe there is a boolean option called topOnDOMChanges
var scroll = new iScroll(contentid, {
desktopCompatibility: true,
bounce: true,
momentum: true,
checkDOMChanges: false,
topOnDOMChanges: false
});
From the Beedesk fork of JQTouch https://github.com/beedesk/jQTouch/blob/master/demos/main/index.html
精彩评论