jquery-mobile 可以使用网格进行多列布局吗?
我正在尝试使用 Jquery Mobile 实现多列布局。
首先我尝试使用 Jquery Mobile Grids。示例可以在这里找到: 链接文本
由于这不起作用,我尝试使用纯 Jquery 和JqueryMobile。这里的例子: 链接文本
更糟糕...
问题: 单击链接时,有没有办法仅使用 Jquery Mobile = 左右内容更新中间网格,并且标题应该保留(持久)? 如果没有,什么是“工作解决方法”
感谢您的帮助,
问候,
频繁
编辑2011-11-24: 我正在为多面板和弹出面板布局设置自己的 JQM 插件。请参阅 Github
I'm trying to get a multi column layout working using Jquery Mobile.
First I tried using Jquery Mobile Grids. Example can be found here:
link text
Since this didn't work, I tried to workaround using plain Jquery and JqueryMobile. Example here:
link text
even worse...
Question:
When a link is clicked, is there a way to only update the middle grid using Jquery Mobile = left and right content AND header should stay (persistent)?
If there isn't, what would be a "working workaround"
Thanks for help,
Regards,
Frequent
EDIT 2011-11-24:
I'm setting up my own JQM plugin for multi-panel and popup-panel layouts. See Github
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
想法3
jQuery Mobile 链接到适用于当前版本的 2 个不同的解决方案。请参阅:
[edit] 不再适用于当前版本。我正在考虑回到游戏并从头开始创建一些东西
http://asyraf9.github.com/jquery-mobile/
或
http://www.stokkers.mobi/valuables/multiview/page2.html
想法 2
插入页面* 事件。
不再可用
http://jquerymobiledictionary.dyndns.org/dualColumn.html
0.2版本已发布。插件现在无需任何 JS 编码即可运行。
想法 1
.page() 已过时,但主要思想仍应适用于 .trigger('create')
我的第一个与当前 jQuery Mobile 兼容的想法是切勿使用加载内容的默认方法。
这样,您将创建您喜欢的网格,并通过 ajax 调用加载内容,将加载的数据放入选定的容器中(必须使用新插入到 DOM 中的容器包装数据)并调用
.page()
关于它。请参阅: http://jquerymobiledictionary.dyndns.org/faq.html这可以工作,但会非 JavaScript 浏览器无法使用。因此它扰乱了 jQuery Mobile 的整体改进。如果您计划创建现实生活中的应用程序,则不应发生这种情况。我在我的jqureymobiledictionary页面中做了这样的事情(字典是通过ajax加载的,如果关闭JS则无法访问)。主要目的是保持 JSON 格式的字典。我不推荐它用于没有开发人员作为主要目标的应用程序:)
Idea 3
jQuery Mobile links to 2 different solutions that work with current version. See:
[edit] doesn't work with current version anymore. I'm considering getting back to the game and creating something from scratch
http://asyraf9.github.com/jquery-mobile/
or
http://www.stokkers.mobi/valuables/multiview/page2.html
Idea 2
Plugging into page* events.
not avaliable anymore
http://jquerymobiledictionary.dyndns.org/dualColumn.html
The version 0.2 was released. Plugin now works without any JS coding.
Idea 1
.page() is obsolete, but the main idea should still work with .trigger('create')
My first idea that will work with current jQuery Mobile is to never use default methods of loading the content.
This way you will create a grid of your liking and load content via your ajax calls, put loaded data in chosen containers (MUST wrap data with a container that is newly inserted into DOM) and call
.page()
on it. see: http://jquerymobiledictionary.dyndns.org/faq.htmlThis will work, but will not ever be usable by non-javascript browsers. So it messes the whole progressive enchancement of jQuery Mobile. This shouldn't happen if you plan on creating a real-life application. I did such a thing in my jqureymobiledictionary page (dictionaries are loaded via ajax, inaccessible if one has JS turned off). The main purpose was to keep dictionaries in JSON format though. I don't recommend it for an application that doesn't have developers as a main target :)