I have made a collapsible fieldset, but I have multiple fieldsets on the same page, and when I click one fieldset it collapses all of them, but I only want it to only collapse the one I clicked on, I have put the necessary code into Jsbin:
Click here
Thanks
$(document).ready(function () {
$(".leg").click(function () {
$("div.proj").toggle();
});
});
The jQuery you have set up applies the current click to all fieldsets, because you are requesting
$("div.proj")for each fieldset.You should use