开发者

Prevent default anchor behavior in jQTouch?

Been scouring the questions here looking for an answer for this specific question, and didn't see anyone with the same issue. I even saw this question asked on the jQTouch wiki with no answers.

When a user clicks a link at the bottom of a long list of a page to animate to a new page (or div), the old page always scrolls up to the page top before animating to the new page.

Is it possible to stay in the current position of the old page (and not scroll up) before animating in the target div?

Was curious if anyone else figured out a way to solve this. Thanks.

(In case you're unclear what bug I'm referring to, you can replicate the behavior using their demo with a desktop browser: http://jqtouch.com/preview/demos/main/#animations, and then resize the browser window until there's a scroll bar. Then scroll down and choose one of the bottom animations to see the content scr开发者_JAVA百科oll to the top before loading the target div.)


I actually found an answer to this:

http://code.google.com/p/jqtouch/issues/detail?id=95#c12

This was a tough answer to track down, but it solves the issue and works like a charm.

Be careful that you don't overwrite your jQtouch JS file when updates are released...unless of course they include this fix in the update!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜