Skip to content

Instantly share code, notes, and snippets.

View studio-fs's full-sized avatar

studio-fs.com studio-fs

View GitHub Profile
JS:
$(".accordeon dd").hide().prev().click(function() {
$(this).parents(".accordeon").find("dd").not(this).slideUp().prev().removeClass("active");
$(this).next().not(":visible").slideDown().prev().addClass("active");
});
CSS:
.accordeon .active { color: red }
HTML: