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> </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
By claire - June 4, 2014
Hi Jac
This sounds like a Javascript issue, not a CMSBuilder one. I would guess that the JS triggers for each link are not being added correctly, and it's opening the wrong div.
The best thing to do is review the Javascript code first.
Hope this helps!
Claire Ryan
interactivetools.com
Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/