jQuery mobile-通过changePage请求多页页面 [英] jquery mobile - requesting multi-page page via changePage

查看:122
本文介绍了jQuery mobile-通过changePage请求多页页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从网站的索引页面,我正在加载另一个页面,该页面具有3个div,具有页面的数据角色. 但是,jquery mobile仅将其中一页添加到dom.

From the index page of the site, I am loading another page which has 3 divs with the data-role of page. However, jquery mobile only appends one of the pages to the dom.

我认为changePage函数正在抓取具有页面数据角色的第一个div并将其插入.我想知道是否有一种方法可以插入带有页面或对话框数据角色的所有div.

I presume the changePage function is grabbing the first div with a data-role of page and inserting it. I wonder if there is a way to get it to insert all the divs with a data-role of page or dialog.

任何帮助都不胜感激. 谢谢

Any help more than appreciated. thanks

推荐答案

JQM目前无法实现您要执行的操作,因为只有多页中的第一页才被加载到DOM中.

What you are trying to do is currently not possible with JQM, as only the first page from a multipage gets loaded into the DOM.

我想指出您指向JQM文档中的链接,该链接可以解释这种行为,但是没有一个...我已经将此问题提交到Github上,以便文档至少可以弄清楚您可以做些什么.可以,但不适用于多页.

I would point point you to a link in the JQM docs that would explain this behavior, but there isn't one... I already filed this as issue on Github, so that the Docs at least make clear what you can do and what does not work with multipages.

由于遇到同样的问题,我开始编写一个插件来加载多页(除其他外).我还有很多事情要解决,但是当它正常工作时,我可以向您发送链接.

As I'm stuck with the same issue I started writing a plugin to be able to load multipages (among other things). I still have a few things to sort out, but when it's working I can send you the link.

这篇关于jQuery mobile-通过changePage请求多页页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆