meteor - Collapsible Tables in Bootstrap 4 -


so i'm using bootstrap 4 , meteor , trying create table collapses when click on row element. i'm having problem collapsing row resizing down size of first <td> element if i'm using colspan="3". here's html:

<table class="table">   <thead class="thead-inverse">     <tr>       <th>school</th>       <th>tech</th>       <th>date</th>     </tr>   </thead>   {{#each school}}   <tbody>     <tr class="school-row">       <td scope="row">{{trimstring name}}</td>       <td>{{trimstring tech}}</td>       <td>{{formatdate createdat}}</td>     </tr>     <tr class="room-collapse">       <td scope="row" colspan="3" data-parent=".room-collapse">         <p>hello test.</p>       </td>     </tr>   </tbody>   {{/each}} </table> 

i'm using .room-collapse jquery target. i'm not applying styling @ moment , jquery triggers working fine. ideas or bug?

the problem here collapse target element needed <div> in case. table element tried attach collapse failed after nested <div> go. code below example:

    <table class="table">       <thead class="thead-inverse">         <tr>           <th>school</th>           <th>tech</th>           <th>date</th>         </tr>       </thead>       {{#each school}}       <tbody>         <tr class="school-row">           <td scope="row">{{trimstring name}}</td>           <td>{{trimstring tech}}</td>           <td>{{formatdate createdat}}</td>         </tr>         <tr>           <td scope="row" colspan="3">             <div class="room-collapse">               <p>hello test.</p>             </div>           </td>         </tr>       </tbody>       {{/each}}     </table> 

hopefully helps somebody. seems bootstrap 4 or particular package i'm using (which twbs:bootstrap@=4.0.0-alpha2).

short answer: wrap collapse in <div class="target"> "target" being target .class or #id.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -