Hide and show lines in page

i have created two buttons  1.hideall 2. showall  in sales quote page
when i click on hideall what ever description rows for item are present it should collapse and only item line should visible
same way when i click on show all rows should display.

can any one please  guide me , how to implement code  in action button so that rows can get collapse