css - Merging Cells in Bootstrap Table -


i have troubles merging cells in bootstrap table i've found example here.

but don't want merging executed clicking button, instead want merge automatically.

here's code:

<table id='viewtable'        data-toggle='table'        data-url='func/json.php?id=1'        data-class='table table-hover table-condensed'        data-striped='true'        data-show-header='false'>     <thead>     <tr>         <th data-field='picture'></th>         <th data-field='description'></th>         <th data-field='value'></th>     </tr>     </thead>     </table>      <script>     $(document).ready(function() {         $('#viewtable').bootstraptable('mergecells', {                 index: 0,                 field: 'picture',                 rowspan: 12         });     });     </script> 

any suggetions?

you can use post-body.bs.table event want:

var $table = $('#viewtable');  $(function () {     $table.on('post-body.bs.table', function () {         $table.bootstraptable('mergecells', {             index: 0,             field: 'picture',             rowspan: 12         });     }); }); 

here jsfiddle example.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -