How to open and collapse the same JQuery accordion with click on it only
问题 Trying to get the accordion open and collapse only when it's being clicked. I am able to open/collapse it but it is getting closed also when another accordion is clicked. It should open or close on its own - independently from other accordions. This is what I have tried. JS: $(document).on("click", ".accordion-toggle", function () { if ($(this).attr('class').indexOf('open') == -1) $(this).toggleClass("open").next().slideToggle('fast'); //Hide the other panels $(".accordion-toggle").not($(this