$(document).ready(function() { $('.faq_section .faq_in a.faq_title').on("click", function(){ $('.faq_section .faq_in a.faq_title').not(this).removeClass('active'); $(this).next('.faq_section .faq_in .faq_content').slideToggle(); $(this).toggleClass('active'); $('.faq_section .faq_in .faq_content').not($(this).next()).slideUp(400); }).filter(':first').click(); });
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter