The visualization appears in the first tab just fine but in all other
tabs its very tiny and unusable. I can't figure out whats the problem.
Help?
<script type="text/javascript"
src="
http://www.google.com/jsapi">
</script>
<script type="text/javascript">
google.load('visualization', '1',
{packages: ['piechart']});
</script>
<script type="text/javascript" src=/includes/js/jquery-1.4.4.min.js></
script>
<script type="text/javascript">
function drawVisualization() {
// Create and populate the data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Month');
data.addColumn('number', 'Sales');
data.addRows([
['January',{v:20, f:'$20M'}],
['February',{v:31, f:'$31M'}],
['March',{v:61, f:'$61M'}],
['April',{v:26, f:'$26M'}],
['May',{v:10, f:'$10M'}]
]);
// Create and draw the visualization.
new google.visualization.PieChart(
document.getElementById('visualization')).
draw(data, {is3D:true});
// Create and draw the visualization.
new google.visualization.PieChart(
document.getElementById('visualization2')).
draw(data, {is3D:true});
}
google.setOnLoadCallback(drawVisualization);
</script>
<script type="text/javascript">
$(document).ready(function() {
//Default Action
$(".tab_content").hide(); //Hide all content
$("ul.tabs li:first").addClass("active").show(); //Activate first tab
$(".tab_content:first").show(); //Show first tab content
//On Click Event
$("ul.tabs li").click(function() {
$("ul.tabs li").removeClass("active"); //Remove any "active" class
$(this).addClass("active"); //Add "active" class to selected tab
$(".tab_content").hide(); //Hide all tab content
var activeTab = $(this).find("a").attr("href"); //Find the rel
attribute value to identify the active tab + content
$(activeTab).fadeIn(); //Fade in the active content
return false;
});
});
</script>
<div class="container2">
<ul class="tabs">
<li><a href="#tab1">Pie1</a></li>
<li><a href="#tab2">Pie2</a></li>
<li><a href="#tab3">Pie3</a></li>
<li><a href="#tab4">Pie4</a></li>
</ul>
<div class="tab_container">
<div id="tab1" class="tab_content">
<div id="visualization"
style="width: 300px; height: 300px; border:1px solid black;
float:right;">
</div>
</div>
<div id="tab2" class="tab_content">
<div id="visualization2"
style="width: 300px; height: 300px; border:1px solid black;
float:right;">
</div>
</div>
<div id="tab3" class="tab_content">
<h2>Resources</h2>
<a href="
http://www.designbombs.com/fashion/lukas-
mynus/"><img src="
http://www.designbombs.com/wp-content/themes/
DesignBombs/images/gallery/mynus_thumb.gif" alt="" /></a>
<h3><a href="http://
www.designbombs.com">
www.DesignBombs.com</a></h3>
<p>Dirt tools thar, pot buffalo put jehosephat rent, ya
pot promenade. Come pickled far greasy fightin', wirey, it poor yer,
drive jig landlord. Rustle is been moonshine whomp hogtied. Stew,
wirey stew cold uncle ails. Slap hoosegow road cooked, where gal pot,
commencin' country. Weren't dogs backwoods, city-slickers me afford
boxcar fat, dumb sittin' sittin' drive rustle slap, tornado. Fuss
stinky knickers whomp ain't, city-slickers sherrif darn ignorant
tobaccee round-up old buckshot that. </p>
<p>Deep-fried over shootin' a wagon cheatin' work cowpoke
poor, wuz, whiskey got wirey that. Shot beer, broke kickin' havin'
buckshot gritts. Drunk, em moonshine his commencin' country drunk
chitlins stole. Fer tonic boxcar liar ass jug cousin simple, wuz
showed yonder hee-haw drive is me. Horse country inbred wirey, skanky
kinfolk. Rattler, sittin' darn skanky fence, shot huntin'.</p>
</div>
<div id="tab4" class="tab_content">
<h2>Contact</h2>
<a href="
http://www.designbombs.com/illustrations/esteban-
munoz/"> <img src="
http://www.designbombs.com/wp-content/themes/
DesignBombs/images/gallery/estebanmunoz_thumb.gif" alt="" /></a>
<h3><a href="http://
www.designbombs.com">
www.DesignBombs.com</a></h3>
<p>Grandma been has bankrupt said hospitality fence
everlastin' wrestlin' rodeo redblooded chitlins marshal. Boobtube soap
her hootch lordy cow, rattler. </p>
<p>Rottgut havin' ignorant go, hee-haw shiney jail fetched
hillbilly havin' cipherin'. Bacon no cowpoke tobaccee horse water
rightly trailer tools git hillbilly. </p>
<p>Jezebel had whiskey snakeoil, askin' weren't, skanky
aunt townfolk fetched. Fit tractor, them broke askin', them havin'
rattler fell heffer, been tax-collectors buffalo. Quarrel confounded
fence wagon trailer, moonshine wuz, city-slickers fixin' cow. </p>
</div>
</div>
</div>