Expand and Collapse buttons function.