Post by Alanna 🥀🖤 on Sept 18, 2016 2:50:52 GMT -8
trinityblair-test.boards.net/
So I am attempting this for a request and this is what I have so far within the Board List layout template:
It works up until you try to click on a different board tab. I believe I need to different the boards and within each category using the board and category id's, however I'm not sure how other than I already have. Ideas?
Brian , Scott , Tumbleweed , Craig
So I am attempting this for a request and this is what I have so far within the Board List layout template:
<script>
$(document).ready(function() {
if($(this).hasClass('inactive')){
$('#tabs$[board.category_id] a').addClass('inactive');
$(this).removeClass('inactive');
$('.tabcontainer$[board.category_id]').hide();
$(t).fadeIn('slow');
}
$('#tabs$[board.category_id] a:not(:first)').addClass('inactive');
$('.tabcontainer$[board.category_id]:not(:first)').hide();
$('#tabs$[board.category_id] a').click(function(){
var t = $(this).attr('href');
$('#tabs$[board.category_id] a').addClass('inactive');
$(this).removeClass('inactive');
$('.tabcontainer$[board.category_id]').hide();
$(t).fadeIn('slow');
return false;
})
});
</script>
<table width="100%">
<tr>
<td id="tabs$[board.category_id]">
{foreach $[board]}
<a href="$[board.content_id]">$[board.name]</a>
{/foreach}
</td>
<td>
{foreach $[board]}
<div class="tabcontainer$[board.category_id]" id="$[board.content_id]">
{if $[board.posts] > 0}
{if $[board.last_thread]}
$[board.last_thread.recent_link]<br />
by $[board.last_thread.last_post.created_by]<br />
<span class="date">$[board.last_thread.last_post.created_on]</span>
{/if}
{else}
No posts have been made on this board.
{/if}
</div>
{/foreach}
</td>
</tr>
</table>
<style>
#tabs$[board.category_id] {
width: 30%;
}
#tabs$[board.category_id] a {
display: block;
background: #e6e6e6;
padding: 10px;
text-align: left;
text-transform: uppercase;
font-size: 10px;
}
#tabs$[board.category_id] a.inactive{
color: #666666;
background-color: #f1f1f1;
}
#tabs$[board.category_id] a:hover, #tabs a.inactive:hover {
color: #000000;
}
.tabcontainer$[board.category_id] {
padding: 10px;
background-color: #fff;
text-align: left;
}
</style>
It works up until you try to click on a different board tab. I believe I need to different the boards and within each category using the board and category id's, however I'm not sure how other than I already have. Ideas?
Brian , Scott , Tumbleweed , Craig