O'Reilly logo

jQuery and JavaScript Phrasebook by Brad Dayley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required