Should do the trick, and hope that helps. Let me know how it goes.
Should do the trick, and hope that helps. Let me know how it goes.
thanks. I will
(*%$)*$)(*#(*
I got it working, I changed it a bit and it still worked.
I added the code to add the links and %_*)*)*(%^#
You can see what its doing on http://3sg.org/beta/3sg_footer.htmPHP Code:<head>
<style>
div.div_3sg
{
width: 100%;
}
div.tab_3sg
{
border: 1px solid;
margin: auto;
clear: both;
height: 120px;
width: 98%;
padding-left: 4px;
}
#tabs li {
list-style: none outside none;
}
#tabs ul {
padding: 0;
border-bottom: 0 none !important;
}
#tabs li, #tabs li a {
float: left;
}
#tabs ul li{
font-weight: bold;
padding: 8px;
text-decoration: none;
cursor: pointer;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
</head>
<body>
<div id="tabs" class="div_3sg">
<div id="tabHeader" style="display: block; float: left; ">
<ul id="tabUl" >
<!-- Tabs Generated Here -->
</ul>
</div>
<!-- Tabs Generated Here -->
</div>
<div id="hidden" style="display:none" class="user_css"><label id="text_color">text</label><a id="link_color" href="#">text</a></div>
</body>
<script>
$(document).ready(function(){
$.getJSON( "include_js.php",function(data){
var items = [];
$.each(data.groups, function(id, group) {
$('<li id="#tab-'+(id+1)+'">'+group.name+'</li>').appendTo('#tabUl');
var div = '<div id="tab-'+(id+1)+'" class="tab_3sg">';
div = div +'<b>'+group.title+'</b><br>';
$.each(group.links, function(id, link) {
div = div + '<a href="'+link.url+'">'+link.name+'</a><br>';
});
div = div + '</div>';
$(div).appendTo('#tabs');
});
});
$('#tabs .tab_3sg').hide();
$('#tabs .tab_3sg:first').show();
$('#tabs ul li:first').addClass('active');
var text_color = $('#text_color').css("color");
var link_color = $('#link_color').css("color");
$('#tabs ul li').css('color',link_color);
$('#tabs ul li:first').css('color', text_color);
$('#tabs ul li').click(function(){
$('#tabs ul li').removeClass('active');
$(this).addClass('active');
var currentTab = $(this).attr('id');
$('#tabs .tab_3sg').hide();
$(currentTab).show();
$('#tabs ul li').css('color', $('#link_color').css("color"));
$(this).css('color', $('#text_color').css("color"));
return false;
});
});
</script>
if the javascript was working that would not be an issue
That page should look/work like the block at the bottom of the page here when its done.
Height is not the issue unless the JS is working in your browser.
this part of the JS is not running in FF
PHP Code:$('#tabs .tab_3sg').hide();
$('#tabs .tab_3sg:first').show();
$('#tabs ul li:first').addClass('active');
var text_color = $('#text_color').css("color");
var link_color = $('#link_color').css("color");
$('#tabs ul li').css('color',link_color);
$('#tabs ul li:first').css('color', text_color);
$('#tabs ul li').click(function(){
$('#tabs ul li').removeClass('active');
$(this).addClass('active');
var currentTab = $(this).attr('id');
$('#tabs .tab_3sg').hide();
$(currentTab).show();
$('#tabs ul li').css('color', $('#link_color').css("color"));
$(this).css('color', $('#text_color').css("color"));
return false;
});
Height is an issue when you are programmatically trying to cram more vertical content into a div than you have made room for via CSS.
I know this because the text overlap under your third header is from the runoff of the div above it.
I have updated my version to demonstrate/help:
http://stealthify.com/3sgto/projects/3sgTabs.php
But I see what you're saying. Your JavaScript wasn't working in my browser, but even so you would still have a runoff outside of the container div.
The version I just posted should solve that. Hope that helps.
Runoff issue fixed in my version.
|
3000gt.com 3000GT / Stealth International WWWboard Archive Jim's (RED3KGT) Reststop |
|
Team 3S 3000GT / Stealth / GTO Information daveblack.net |
|
Michigan 3S MInnesota 3S Wisconsin 3S Iowa, Nebraska, Kansas 3S |
North California 3000GT/Stealth United Society of 3S Owners 3000GT/Stealth/GTO Forums 3000GT/Stealth International |
|
3S National Gathering East Coast Gathering Upper Mid-West Gathering Blue Ridge Gathering |
Bookmarks