Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <table data-role="table" id="table" data-mode="columntoggle" class="ui-body-d ui-shadow table-stripe ui-responsive" data-column-btn-theme="b" data-column-btn-text="Columns to display..." data-column-popup-theme="a">
- <thead>
- <tr class="ui-bar-d">
- <th data-priority="1">#</th>
- <th data-priority="1">Data Code</th>
- <th>Data Name</th>
- <th>Value</th>
- <th data-priority="1">Minimum</th>
- <th data-priority="1">Maximum</th>
- </tr>
- </thead>
- <tbody>
- ...
- </tbody>
- </table>
- for (var i = 0; i < rows.length; i++) {
- html = html + "<tr>n";
- for (var j = 0; j < rows[i].length; j++) {
- html = html + "<td>" + rows[i][j] + "</td>n";
- }
- html = html + "</tr>nn";
- }
- $("#table > tbody").append(html);
- $("#table").table("refresh");
- $("#table > tbody").append(html);
- $("#table").table("refresh");
- // Code to add
- var columnIndex = 0;
- $("#table-popup fieldset").find("input").each(function(){
- var sel = ":nth-child(" + (columnIndex + 1) + ")";
- $(this).jqmData("cells", $("#table").find("tr").children(sel));
- columnIndex++;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement