MyBB Community Forums

Full Version: Collape button
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to add a collapse button to a menu in the header iv added this code:
<td class="tcat">
	  <tr>
<div class="expcolimage"><img src="http://www.gfxpalace.com/images/realize/collapse.gif" id="block_{$result_blocks['id']}_img" class="expander" alt="{$expaltext}" title="{$expaltext}" /></div><strong>{$title}</strong></td>
</tr>
<tbody style="{$expdisplay}" id="block_{$result_blocks['id']}_e">

But when i collapse it and refresh the page its uncollapsed how do i get it to remember how i left it.
This isn't really MyBB general support but you should set a cookie to remember their choice. Here is an article on how to do it with JavaScript http://techpatterns.com/downloads/javasc...ookies.php
I was thinking i may need a cookie thank you but this code seems a bit to hard for me as i dont know much about coding.