The Arcive of vBulletin Modifications Site. |
|
Forum Collapse using JQuery Details »»
|
|||||||||||||||||||||||||
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>
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>
Code:
<vb:if condition="$page['channelid'] == 1 OR $page['channelid'] == 1" />
{vb:template forum_collapse}
</vb:if>
Best Regards Godarmy Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
the jquery is now in footer template.
Quote:
Quote:
|
|
#3
|
|||
|
|||
|
Can we have a possible demo or screenshot please?
|
|
#4
|
|||
|
|||
|
Hi,
it works for me ( using vb 5 ) .... and how can I make the sub forums in a state of collapse on the main page so that it does not require a lot of scrolling because of the many sub forums ? thanks in advance |
|
#5
|
||||
|
||||
|
which header template? i didn't found that code in header template
|
|
#6
|
|||
|
|||
|
Not in header... is in footer template.
|
![]() |
|
|