使用 jquery mobile 进行 iscroll 页面转换

发布于 2024-11-18 13:32:37 字数 597 浏览 6 评论 0原文

我试图让 iscroll 与 jquery mobile 一起工作数周。

我已经根据 iscroll 的 check-dom-changes 示例制作了一个快速示例(如果您知道其他方式,我也会采用它:)

以下是我制作的页面代码:

Page1: http://jsbin.com/ixomob/edit

然后是测试页面: http://teraonline.be/street/iscrolltest/index.html

如您所见当您单击 page2 链接时, page2 出现,但 iscroll 不再工作(您会看到本机向右滚动),也许它们是刷新 page2 dom 的另一种方法,但我没有找到如何,因为我是 javascript 新手(我已经阅读了 iscroll4 页面上的其他示例,但也许我没有正确使用它们)。

我使用最新版本的iscroll和jqm。

你们是我最后的希望,伙计们!

I am trying to make iscroll work with jquery mobile for weeks.

I have make a quick sample based on the check-dom-changes exemple of iscroll (if you know other way i will take it too :)

Here are the code of pages i have make :

Page1 :
http://jsbin.com/ixomob/edit

And then the test page :
http://teraonline.be/street/iscrolltest/index.html

As you can see when you click the page2 link, the page2 appear but iscroll don't work anymore (you see native scrolling to the right instead), maybe they are another way to refresh the dom for the page2 but i don't have found how, because i am novice in javascript (i have read the other example on iscroll4 page, but maybe i don't have use them correctly).

I use the latest version of iscroll and jqm.

You are my last hope guys !

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

洛阳烟雨空心柳 2024-11-25 13:32:37

我认为您需要再次初始化 iScroll 并再次刷新它,这就是我使用 JQuery Mobile 在 #page2 上实现 iScroll 的方法...没有找到其他方法。

I think you'll need to initialize the iScroll again and refresh it again, that is how I did realize iScroll on #page2 with JQuery Mobile... found no other way.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文