How to create a collapsible Fieldset using JQuery & css

We can create a collapsible fieldset very easily using Jquery & css. Lets see how to achieve same :
To achieve same a Jquery function is attached to click event of Legend, and whenever legend is clicked,
a specific css class is toggled on Div present inside fieldset where all fieldset content resides.
Css class: Active whenever is attached to div then legend text is changed to Collapse me else changed to Expand me.

Continue reading