function of accordion to make in javascript