Revised by
Rik Kendell
49ee8e7
| <?php if ( have_rows( 'question_list' ) ) : ?>
<dl class="accordion-list">
<?php while ( have_rows( 'question_list' ) ) : the_row(); ?>
<dt><a href="javascript:void(0);"><?php echo get_sub_field('question'); ?></a></dt>
<dd>
<?php echo get_sub_field('answer'); ?>
</dd>
<?php endwhile; ?>
</dl>
<?php endif; ?>
|
| $(document).ready(function(){
// FAQs Accordion
accordionList = function() {
var allPanels = $('.accordion-list > dd').hide();
$('.accordion-list > dt > a').click( function() {
allPanels.slideUp();
$(this).parent().next().slideDown();
return false;
})
}
accordionList();
});
|