I have an html table with many rows. I'm currently grouping several rows inside a div (I know this is ugly) and then show or hide the divs to show or hide the rows inside it. Is there a standard way to do this. Something like rowgroup or multiple tbody instead of this ugly div grouping?
table-row-group (In HTML: TBODY) Specifies that an element groups one or more rows. table-header-group (In HTML: THEAD) Like 'table-row-group', but for visual formatting, the row group is always displayed before all other rows and row groups and after any top captions.
<tr>: The Table Row element. The <tr> HTML element defines a row of cells in a table. The row's cells can then be established using a mix of <td> (data cell) and <th> (header cell) elements.
In first function that is edit_row() function is used to edit rows. In this function we get row id in 'no' variable and then we hide and edit button and display the save button then we get all the data of edit row and insert the textbox with data in edit row to make rows editable.
Use <tbody>
tags for this
Give them a class name that is consistent then you can do:
$('table td.classname')
To get the ones you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With