I have a table where my rows have classes:
<table id="abc">
<tr class="level-0">
<tr class="level-1">
<tr class="level-2">
</table>
I need to create two buttons.
- [Hide level 1 and 2] – when clicks this hides or shows all the
level-2 rows. - [Hide level 2] – when clicks this hides or shows the level-1 and level-2 rows.
Can someone tell me how I can implement this with jQuery?
Use
clickevent handler andtogglefunction (for description check jquery API):http://jsfiddle.net/73JAV/