MyBB Community Forums

Full Version: xThread FAQ
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I have some problem with collapse answer box like that:
[Image: 540f2fe7e774420ebdc66ff5bbd4e001.png]
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?