FAQ css/jquery

jQuery(document).ready(function( $ ){ if(document.querySelector(‘.eachFAQ’) != null) { jQuery(“.faq_answer”).hide(); jQuery( “.eachFAQ” ).each(function( index ) { jQuery( this ).click(function() { if(jQuery(this).find(“.faq_answer”).css(‘display’) == ‘none’) { jQuery( this ).find(“.faq_answer”).show(); } else { jQuery( this ).find(“.faq_answer”).hide(); } }); }); jQuery(“.eachFAQ:first-of-type p.faq_answer”).show(); } });

Leave a Reply

Your email address will not be published. Required fields are marked *