accordion functionality js code example
Example: jquery accordion
<script>
$(function() {
$('.faqAnswer').slideUp(); // for content
$(".faqTitle").on( "click", function() { // for title
var x = $(this).next();
$('.faqAnswer').not(x).slideUp();
$(this).next().slideToggle(200);
});
});
</script>