Whenever I try to expand the first panel in my accordion, all other panels also expand. How can I make it so that only the parent panel expands when its collapse link is clicked?
Below is the code I am using:
$('.stats-panel').hide();
$(".expand a").click(function(){
$(this).parent().toggleClass('collapse');
$('.expand').parent().children().find('.stats-panel').slideToggle();
$('.key-project-graph').slideToggle();
});
Note: The HTML structure of this project cannot be altered.