Admin
Well-Known Member
Staff member
Administrator
Make Forum item and forum list collapseable
Add new template --> name it as you want (in this i called forum_collapse--> and then put this code
	
	
	
		
and then...
edit template footer...and find this line
	
	
	
		
and then...add this line...after above line
	
	
	
		
but there is some kind of bug that i cannot solve it yet...if forum category consist no forum item...it still collapse but it will roll another forum category...anyone can help me with this bug?to optimize my code maybe?
Best Regards
Godarmy
				
			Add new template --> name it as you want (in this i called forum_collapse--> and then put this code
		HTML:
	
	<script type="text/javascript">
jQuery(document).ready(function () {
        jQuery(".forum-list-container .forum-item").show();
        jQuery("tr.subforum-list").show();
        //toggle the componenet with class msg_body
        jQuery("TR.category-header").click(function () {
                    jQuery(this).nextUntil(".forum-list-container .forum-item").slideToggle(100);
                    jQuery(this).next("tr.subforum-list").slideToggle(100);
                    jQuery(this).nextUntil("TR.category-header").slideToggle(100);
                });
});       
</script>
	and then...
edit template footer...and find this line
		HTML:
	
	<script type="text/javascript" src="{vb:raw jqueryurl}"></script>
<script type="text/javascript">window.jQuery || document.write('<script type="text/javascript" src="{vb:raw baseurl}/js/jquery/jquery-{vb:raw jqueryversion}.min.js"><\/script>');</script>
{vb:js 1, js/footer-rollup.js}
	and then...add this line...after above line
		Code:
	
	{vb:template forum_collapse}
	but there is some kind of bug that i cannot solve it yet...if forum category consist no forum item...it still collapse but it will roll another forum category...anyone can help me with this bug?to optimize my code maybe?
Best Regards
Godarmy