Added clode button JS function