php - How can I show tr with same class in same tbody -


i have:

<tbody> <tr class='default'></tr> <tr class='sample'></tr> <tr class='sample'></tr> <tr class='sample'></tr> <tr class='default'></tr> </tbody> 

all of classes coming foreach loop in same sequence. want display tr default class in separate tbody , tr sample class in different tbody below

 <tbody>     <tr class='default'></tr>     <tr class='default'></tr>  </tbody>   <tbody>     <tr class='sample'></tr>     <tr class='sample'></tr>     <tr class='sample'></tr> </tbody> 

how can so?

you can define styles tbody's , have tr's styled depending on parent:

html:

<tbody class="default">     <tr></tr>     <tr></tr>  </tbody>   <tbody class="sample">     <tr></tr>     <tr></tr>     <tr></tr> </tbody> 

style:

tbody.default tr { ... } tbody.sample tr { ... } 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -