Help all!

Okay, how do i make a table collapse when a button is clicked, and than repon when its click again? Okay so lets say i have three tables, i want the first two tables to be open by default, and than the last table, i want to be closed by default.