2013-02-13 49 views
3

我一直在使用jQuery Mobile新的响应表。我有3张桌子,其中2人按预期完美工作,但由于某种原因,最后一张桌子拒绝工作。jQuery Mobile响应表不能正常工作

下面的代码:

<table data-role='table' id='TableProfile' class='ui-responsive table-stroke'> 
<thead> 
    <tr> 
     <th data-priority='persist'>#</th> 
     <th data-priority='persist'>Title</th> 
     <th>Author</th> 
     <th>Publisher</th> 
     <th>Edition</th> 
     <th data-priority='3'>Condition</th> 
     <th data-priority='2'>Price</th> 
     <th>Sold</th> 
    </tr> 
</thead> 
<tbody> 
    <tr> 
     <td>1</td> 
     <td>Thomas Calculus Early Transcendentals</td> 
     <td>MD.Weir, GB.Thomas Jr, J. Hass, FR.Giordano</td> 
     <td>Brooks/Cole</td> 
     <td>12</td> 
     <td>5</td> 
     <td>750</td> 
     <td><input type='button' value='Sold' name=70/></td> 
    </tr> 
    <tr> 
     <td>2</td> 
     <td>Thomas Calculus Early Transcendentals</td> 
     <td>MD.Weir, GB.Thomas Jr, J. Hass, FR.Giordano</td> 
     <td>Brooks/Cole</td> 
     <td>10</td> 
     <td>4</td> 
     <td>1000</td> 
     <td><input type='button' value='Sold' name=73/></td> 
    </tr> 
</tbody> 

</table> 

我使用jQuery Mobile的1.3版本,但I'n知道为什么,这表是不工作

回答

0

我敢肯定有一个bug一些地方因为这个功能是新的。现在解决我的问题是彻底关闭我正在工作的选项卡,然后再次打开该网站,它的工作。刷新页面不会解决问题。

1

您确定您使用jQuery> 1.7吗? jQuerymobile需要jQuery 1.7或更高版本才能运行。

我试过了,它似乎工作。

做它的标准方式是:

<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> 

工作示例代码的:http://jsfiddle.net/AYSJZ