Building Mobile-Friendly Tables

<table data-role="table" data-mode="reflow"     id="parkTable">  . . . or . . . <table data-role="table" data-mode="columntoggle"     id="parkTable">   <thead><tr><th>Park</th>     <th data-priority="1">State</th>     <th data-priority="2">Est.</th>     <th data-priority="3">Photo</th></tr>   </thead>   <tbody>     <tr><td>Yellowstone</th><td>MT</td><td>1872</td>       <td><img src="bison.jpg" width="100" /></tr>     <tr><td>Yosemite</th><td>CA</td><td>1872</td><td>       <img src="falls.jpg" width="100" /></tr>     <tr><td>Zion</th><td>UT</td><td>1919</td><td>       <img src="peak.jpg" width="100" /></tr>   </tbody> </table>

jQuery Mobile adds a data-mode attribute to the <table> ...

Get jQuery and JavaScript Phrasebook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.