简体   繁体   English

jQuery Mobile的表不响应?

[英]Jquery Mobile's Table is not Responsive?

I am using a simple table from jquery mobile site. 我正在使用来自jQuery移动网站的简单表格。 Here is my page html, 这是我的页面html,

    <div data-role="page" id="mainPage">
        <div data-role="content">

            <table data-role="table" id="my-table" data-mode="reflow">
                <thead>
                    <tr>
                        <th>Rank</th>
                        <th>Movie Title</th>
                        <th>Year</th>
                        <th>
                            <abbr title="Rotten Tomato Rating">Rating</abbr></th>
                        <th>Reviews</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <th>1</th>
                        <td><a href="foo.com" data-rel="external">Citizen Kane</a></td>
                        <td>1941</td>
                        <td>100%</td>
                        <td>74</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>

But my page is look like very ugly. 但是我的页面看起来非常难看。 Seems no jquery applied here. 似乎这里没有应用jquery。 Here is the screen shot, 这是屏幕截图, 在此处输入图片说明

From Here, http://forum.jquery.com/topic/where-to-get-jquery-mobile-table-js 在这里, http://forum.jquery.com/topic/where-to-get-jquery-mobile-table-js

The table functionality is only in the unreleased version 1.3. 该表功能仅在未发行的版本1.3中。

If you want to test 1.3, you can check it out from GitHub and build it, or else just download the .js and .css files from the online test docs. 如果要测试1.3,可以从GitHub检出并进行构建,或者只是从在线测试文档中下载.js和.css文件。

As this isn't even beta software yet, I wouldn't use it in production. 由于这还不是beta版软件,因此我不会在生产中使用它。

There is already a working responsive table jQM plugin available here: https://github.com/frequent/tableview . 此处已经有可用的响应表jQM插件: https : //github.com/frequent/tableview

It comes in two modes, non functional one which is only a tableview and functional one which comes in combination with database plugin . 它有两种模式,一种是非功能性的模式,仅是一个表视图;另一种是功能性的模式,与数据库插件结合使用。

Here's an demo: http://www.franckreich.de/jqm/tableview/demo.html . 这是一个演示: http : //www.franckreich.de/jqm/tableview/demo.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM