I want to use this script and functionality (Animated Collapsible) taken from w3schools, it works perfect with text <p> or static content. but my goal is to insert content that can be expanded or reduced on click (i.e.: Tree view content) inside the Collapsible Div. I tried, but if I do, when I click on arrow to expand one item, collapsible div is not auto expanded/reduced according to my click. Is there a way to make it auto expand or reduce itself ? Otherwise can you suggest me another script that includes this functionality?? Thank you in advance