toggleclass issue with overflow

toggleclass issue with overflow

Hi,

I have a div with one line (css overflow hidden), which is clickable

the onclick will load a css class that makes the height much bigger so the hidden info appears (somewhat like accordion), however this second class has overflow:auto because it can be scrollable. Now when I click and scroll down and then click again to close the div, I don't go back to the top of the div content.

Is there a way so I can define that on closing and going back to the original css class with overflow:hidden the top content is displayed again?

thx for your help!