Last active
February 1, 2016 13:45
-
-
Save jadwigo/45a17e99236fd7a2f087 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// FAQ | |
$('.faq .bodytext').hide(); // alle teksten sluiten | |
$('.faq h4.title').removeClass('open'); // alle "open" classes verwijderen | |
$('.faq h4.title').click(function() { | |
if($(this).hasClass('open')!=true) { // kijk of deze title al open is | |
$('.faq h4.title').removeClass('open'); // sluit alle open title | |
$('.faq .bodytext').slideUp('fast'); // sluit alle open teksten | |
$(this).parents('.faq').find('.bodytext').slideDown('fast'); // open deze tekst | |
$(this).addClass('open'); // voeg open class toe bij deze title | |
} else { | |
$(this).parents('.faq').find('.bodytext').slideUp('fast'); // sluit deze tekst | |
$(this).removeClass('open'); // verwijder class toe bij deze title | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment