I'm working on creating a slide-open div that is initially hidden and then becomes visible when clicked.
To achieve this effect, I am using the animate() function to adjust the height of the div.
However, I am facing an issue because the div contains multiple content sections with variable heights. This makes it challenging to predict the final height of the div after adding new content.
How can I accurately determine the height of the div in order to successfully animate('height':'-px') and achieve the desired slide-open effect?