FAQ list with dropdown slider

2 posts by 2 authors in: Forums > CMS Builder
Last Post: June 4, 2014   (RSS)

By esupport - June 2, 2014

Hi

I am creating a slide FAQ list like this

http://www.ckh.com.hk/eng/page38_21.html#list0_1

When you click the FAQ tab.  It will display a full content.

Click again.  It will be closed.

Here is my code:

<div class="block">
<h2>
<?php foreach ($faqRecords as $record): ?>
</h2>
<div class="record-list"> <a href="#"><?php echo htmlencode($record['question']) ?></a>
<div style="border-bottom:1px solid #ccc; width:100%;">
<li><?php echo $record['answer']; ?></li>
<p>&nbsp;</p>
<ul>
<?php endforeach ?>
<?php if (!$faqRecords): ?>
No records were found!<br/>
<br/>
<?php endif ?>
</ul>
</div>
<p> </p>
</div>
</div>

It can slide the code with no problem.

But the next FAQ question display in the first record.

Hope can get correct code.  Thanks!

Jac

-Jax H.