• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Forum Collapse using JQuery

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

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
 

Facebook Comments

Similar threads
Thread starter Title Forum Replies Date
hungdanchoi5 Forum Xenforo Thảo luận chung 1
Admin Yilmaz -Tabbed (AJAX) Advanced Forum Stats Add-ons 0
Admin Yilmaz - Channel Description Per Forum Page vB5 Add-ons 0
Admin Convert a suggestion forum to XF 2.2 Suggestion Type Forum Xenforo 0
Admin Remove/hide forum name and description from forum page xenforo 2 Xenforo 0
Admin [VNXF 2x] Google Trans - Add auto Google translate bar into your forum Xenforo 0
Admin Photo / Image Competition with a Question forum Xenforo 2 Xenforo 0
Admin [XenGenTr] Forum statistics system English Xenforo 2 Xenforo 0
Admin How to limit the size of Google AutoAds on your forum xenforo 2 Xenforo 0
Admin [BS] Forum view count xenforo 2 Xenforo 0
Admin [XenGenTr] Forum istatistik sistemi - Vietnamese Xenforo 0
Admin Forum Leaders Module for vBa CMPS Add-ons 0
cuongpro9x Share code forum xenforo 2 Xenforo 145
Admin [vBMods.rocks] Make Forum Statistics Module Rock! (vBCloud compatible) Add-ons 0
Admin Color in the forum link vBulletin Add-ons 0
Admin [TW] Forum Statistics xF 2 Light and Dark xenforo 2 Xenforo 2.x Premium 0
dammechiase Phần mềm PC Phần Mềm Spam Diễn Đàn Forum mới nhất Trò chơi 0
A Rank Forum By Cát Come Back - Link Full Thiết kế đồ họa 1
Admin Hướng dẫn hiển thị chuyên mục 2 cột cho xenforo 2 - How to sub-forum columns xenforo 2 Xenforo 0
X Tuyển người làm chung forum Johncms 0
L Xin Chào Anh Em Trong Forum Thảo luận chung 4
T Trợ Giúp Tạo Forum Thảo luận chung 0
Hong98 Help Lỗi khi import database forum vbb Vbulletin 10
T Share Code forum johncms 6.2 - Vietgenk.com Johncms 8
N Help xin code thống kê bài viết cho forum phpbb3.11 . em đang dùng giao diện prosilver Phpbb3x 0
N Help xin code , tạo icon , trước tên thành viên , của forum phpbb 3.11 Phpbb3x 0
T Xin Xin một code forum đẹp Mã nguồn web 9
V Hướng Dẫn Tạo Forum Trên Xtgem Wap builder, wapego, xtgem, wen.ru, wapka, wap4 1
Tuzoro Code Forum Johncms Mod Giống M4v Giao Diện Cực Đẹp Johncms 1
D Hỏi Cần cao thủ vbb fix giúp lỗi forum 4.2 Vbulletin 5
V Xin Admin cho xin cái mod thống kê số người online của. Forum này nha Vbulletin 4
Admin [DGT] vBulletin.Forum.v4.2.2.incl.KeyGen.PHP.NULL-DGT Vbb released 0
Admin [DGT] vBulletin.Forum.v4.2.2.PHP.NULL-DGT Vbb released 3
N Help Hỏi về cách dùng forum Mong anh em giúp mình với nhe Vbulletin 7
Admin Share skin tết giáp ngọ 2014 cho forum-viet.net HTML & CSS 0
Admin [OzzModz] First Post On All Pages Per Thread/Forum Add-ons 0
Admin Share code forum johncms 5.2 vipwap.pro Johncms 0
H Cần học làm forum bằng vbb Thảo luận chung 16
Admin Check If Your Forum Was Hacked Add-ons 1
nhokzodanh xin code làm forum john với ợ Johncms 9
Admin vBulletin Forum 4.2.2 [ NULLED G3 | DNU & MC KEY | VBWAREZ ] Vbb released 2
Admin Potential Forum Runner XSS Exploit (vBulletin 4.1.12, vBulletin 4.2+) Bảo mật 0
A Xin hướng dẫn tạo forum xenforo chi tiết dễ hiểu Thảo luận wap việt 4
A Help cách tạo forum john trên host DA với Thảo luận wap việt 2
A Share Open wap tẠo forum miỄn phÍ by anhphu2 Wap builder, wapego, xtgem, wen.ru, wapka, wap4 2
Dungcaro Hỏi ai hướng dẫn mình thêm style pc chp forum dùm Johncms 3
Admin Forum Radio Player Vbb tutorial 1
Admin BBCode Embed Tune.pk Videos in your forum Vbb tutorial 1
Admin Basic forum Ranks Vbulletin 0
Admin Ebook hướng dẫn làm forum bằng php và mysql kèm theo source code full PHP 0

Similar threads

New posts New threads New resources

Back
Top