Jquery mobile 为什么简单jQuery移动表显示为转置?

Jquery mobile 为什么简单jQuery移动表显示为转置?,jquery-mobile,Jquery Mobile,将示例(和简单)表放在页面上: 然后尝试将表jQuery设置为样式-只需将data role=“table”添加到表标记中。 出其不意-换位的表格:1)标题是列(!)2)行是列。 看看这个: Column 1 Column 2 Column 3 Row 1 Column 1 Row 1 Column 2 Row 1 Column 3 Row 2 Column 1 Row 2 Column 2 Row 2 Column 3 Column 1Row 1 Column 1 Col

将示例(和简单)表放在页面上:

然后尝试将表jQuery设置为样式-只需将data role=“table”添加到表标记中。 出其不意-换位的表格:1)标题是列(!)2)行是列。 看看这个:

Column 1    Column 2    Column 3
Row 1 Column 1  Row 1 Column 2  Row 1 Column 3
Row 2 Column 1  Row 2 Column 2  Row 2 Column 3
Column 1Row 1 Column 1
Column 2Row 1 Column 2
Column 3Row 1 Column 3
Column 1Row 2 Column 1
Column 2Row 2 Column 2
Column 3Row 2 Column 3
这是默认行为吗?
怎么了?如何强制jQuery表正常运行?

默认情况下有两种
数据模式
,它是
回流
,其中它将表列折叠成一个堆叠的表示形式,看起来像是每行的标签/数据对块。这种行为仅在移动设备中明显,但在deskop/tablet中,它看起来像一张普通的桌子

包含大量列的大型表不适合较小的屏幕,因此有另一种模式称为
columnttoggle
,允许用户切换列

但是,要获得桌面浏览器中的默认表结构,请去掉
数据角色
属性或设置
数据角色

放置
data mode=“columnttoggle”


默认情况下,有两种
数据模式
,它是
回流
,其中它将表格列折叠成一个堆叠的表示,看起来像每行的标签/数据对块。这种行为仅在移动设备中明显,但在deskop/tablet中,它看起来像一张普通的桌子

包含大量列的大型表不适合较小的屏幕,因此有另一种模式称为
columnttoggle
,允许用户切换列

但是,要获得桌面浏览器中的默认表结构,请去掉
数据角色
属性或设置
数据角色

放置
data mode=“columnttoggle”


除了不需要“列”按钮外,几乎满足了我的需求。如何隐藏它?显然,ColumntToggleModewithColumns按钮看起来肯定和非jQuery的表一样。但是它有方法/属性/事件等作为jQuery对象-这就是为什么我不想使用仅HTML的表这里我能想到的解决方法是使用css隐藏按钮,我已经更新了fiddle。请检查。几乎是我想要的,除了不需要“列”按钮。如何隐藏它?显然,ColumntToggleModewithColumns按钮看起来肯定和非jQuery的表一样。但是它有方法/属性/事件等作为jQuery对象-这就是为什么我不想使用仅HTML的表这里我能想到的解决方法是使用css隐藏按钮,我已经更新了fiddle。请查收。
Column 1Row 1 Column 1
Column 2Row 1 Column 2
Column 3Row 1 Column 3
Column 1Row 2 Column 1
Column 2Row 2 Column 2
Column 3Row 2 Column 3
<table data-role="table" id="my-table" data-mode="columntoggle">
    <thead>
        <tr>
            <th>Column 1</th>
            <th>Column 2</th>
            <th>Column 3</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Row 1 Column 1</td>
            <td>Row 1 Column 2</td>
            <td>Row 1 Column 3</td>
        </tr>
        <tr>
            <td>Row 2 Column 1</td>
            <td>Row 2 Column 2</td>
            <td>Row 2 Column 3</td>
        </tr>
    </tbody>
</table>
.ui-table-columntoggle-btn { display: none;}