javascript - Responsive table looses responsiveness when populating -
javascript - Responsive table looses responsiveness when populating -
i have jquery mobile responsive table. when resizing browser window, more/less columns show up, works fine. http://jsfiddle.net/bambamm/fe4ppftm/1/
<table data-role="table" data-mode="columntoggle" class="ui-responsive" id="customertable"> <thead> <tr> <th data-priority="6">customer id</th> <th>customer name</th> <th data-priority="1">first name</th> <th data-priority="2">address</th> <th data-priority="3">city</th> <th data-priority="4">postalcode</th> <th data-priority="5">country</th> </tr> </thead> <tbody id="customertablebody"> <tr> <td>10801</td> <td>some name</td> <td>some firt name</td> <td>some address</td> <td>london</td> <td>123456</td> <td>united kingdom</td> </tr> </tbody> </table> when seek populate table dynamically though, responsive table not responsive anymore when resizing browser. i'm filling table via setting html code of table body: http://jsfiddle.net/bambamm/e2ukzy5z/1/
tablebody = "<tr><td>10801</td> <td>some name</td> <td>some firt name</td> <td>some address</td> <td>london</td> <td>123456</td> <td>united kingdom</td> </tr>"; $('#customertablebody').html(tablebody); what should create work?
i think have phone call refresh after add together new rows.
$('#customertable').table( "refresh" )
https://github.com/jquery/jquery-mobile/issues/5570
javascript jquery html jquery-mobile
Comments
Post a Comment