Back to vBulletin 5.x Template Modifications

Forum Collapse using JQuery
Mod Version: 1.00, by godarmy

vB Version: 5.0.x Rating: (0 vote - 0 average) Installs: 8
Released: 19 Jul 2013 Last Update: Never Downloads: 0
Not Supported Template Edits Re-usable Code  

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

Code:
<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").fadeToggle(100);
                    jQuery(this).next("tr.subforum-list").fadeToggle(100);
                    jQuery(this).nextUntil("TR.category-header").fadeToggle(100);
                });
});       
</script>
and then...

edit template header...and find this line
Code:
<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>
and then...add this line...after below line
Code:
<vb:if condition="$page['channelid'] == 1 OR $page['channelid'] == 1" />
{vb:template forum_collapse}
</vb:if>
also we can combine it.. with css to do some animation like folder tree

Best Regards

Godarmy

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2024