I want to toggle a div element (expand/collapse) when clicked. I have many div elements, on click to new element, I want to collapse the previous one and expand the current clicked one.
I tried using static type variable to save the instance of previous div tag and compared with the current selection, but I don t know why is it not working.
在寻求这一点时,我有着类似的法典想法,以便倒掉所有四舍五入,然后只扩大目前选定的部分,但我想仅仅把前面的一条与新的一环相提并论,不要倒一切,扩大选定的部分(尽管如果不可能有其他方式的话,我会加以利用)。
是否能够利用静 of的静态变量来做到这一点?