Page 55 - JqueryMobile_Manual
P. 55
55
Chapter 10
jQuery Mobile Tables
Create a reflow table
tryjqmob_tables_reflow.html
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
<div data-role="page" id="pageone">
<div data-role="header">
<h1>Reflow Table</h1>
</div>
<div data-role="main" class="ui-content">
<p>Reflow Tables lay the table data horizontally until it reaches a minimum size, then all rows are
grouped together in a vertical stack with the corresponding labels.</p>
<p>In this example we have used the well-known Northwind sample database. Below is a selection from
the "Customers" table.</p>
<p>Try to resize the width of your browser window, to see the effect.</p>
<table data-role="table" class="ui-responsive">
<thead>
<tr>
<th>CustomerID</th>
<th>CustomerName</th>
<th>ContactName</th>
<th>Address</th>
<th>City</th>
<th>PostalCode</th>
<th>Country</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Obere Str. 57</td>
<td>Berlin</td>
<td>12209</td>
<td>Germany</td>
</tr>
<tr>
<td>2</td>
<td>Antonio Moreno Taquería</td>
<td>Antonio Moreno</td>
<td>Mataderos 2312</td>
<td>México D.F.</td>
<td>05023</td>
<td>Mexico</td>