Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$(".accordion-title").click(function () {
var blockFaq = $(this).parents(".accordion-item");
if (!$(blockFaq).hasClass("accordion-active")) {
$(".accordion-item").removeClass("accordion-active");
$(".accordion-content").hide(300);
$(blockFaq).addClass("accordion-active");
$(blockFaq).find(".accordion-content").show(300);
}
else {
$(".accordion-item").removeClass("accordion-active");
$(".accordion-content").hide(300);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.