Refactor continaer__toggle javascript