I would like to ask will it be possible that I have a table like this: JsFiddle
Expected result with Product BCD hidden:
<table>
<th>
Product Detail Display
</th>
<tr>
<td> ----- Product A -----</td>
</tr>
<tr>
<td>
<div class="left">Total: 4 Product(s)</div>
<div class="right"><button>View More Products</button></div>
</td>
</tr>
</table>
I want it initially will only display "Product A", and "Product B,C,D" will be three hidden rows. Until I click on the button "View More Products", the rows for "Product B,C,D" will be displayed. And the button will become "View Fewer Products" while the "Product B,C,D" will be hidden again...
I am not quite familiar with the table attribute such that I would like to ask whether it will be possible to do so? I am not sure the <td>
attribute can deal with this... Or actually it will be better to use <div>
and jQuery to control this action?