2017-05-26, 07:01 PM
Hi,
I have some problem with collapse answer box like that:
What should I do to fix it?
Orginal thread:
http://mybbhacks.zingaburga.com/showthre...242&page=1
Thanks for help!
When I add prototype.js and delete
and add:
It works, but why it doesn't work in original code?
I have some problem with collapse answer box like that:
What should I do to fix it?
Orginal thread:
http://mybbhacks.zingaburga.com/showthre...242&page=1
<tr>
{$modbit}
<td style="width: 100%;">
<div>
<span>{$thread['threadprefix']}<strong>{$lang->xtfaq_q} <a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}" onclick="$('faq_answer_{$thread['tid']}').toggle(); return false;">{$thread['subject']}</a></strong></span>
<br class="clear" />
<div id="faq_answer_{$thread['tid']}">
<div class="float_left" style="display: block;"><strong>{$lang->xtfaq_a}</strong></div>
<div style="margin-left: 20px;">{$threadfields['faq_answer']}</div>
<div class="clear" style="margin: 5px 0px 9px 20px;">
{$gotounread}<a href="{$thread['threadlink']}"><em>{$lang->xtfaq_moreinfo}</em></a>
{$thread['multipage']}<br />
<span class="smalltext">
<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}{$lang->comma}
{$lastpostdate} {$lastposttime}
</span>
</div>
</div>
<script type="text/javascript">
<!--
$('faq_answer_{$thread['tid']}').style.display = 'none';
// -->
</script>
</div>
</td>
</tr>
Thanks for help!
When I add prototype.js and delete
$('faq_answer_{$thread['tid']}').style.display = 'none';
and add:
style="display:none;"
It works, but why it doesn't work in original code?