godarmy
07-17-2013, 10:00 PM
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
<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
<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
<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
Add new template --> name it as you want (in this i called forum_collapse--> and then put this 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
<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
<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