$(document).ready(function(){ $(".rowShowHide").hide(); $(".tablesShowHide").hide(); //assign the sortStart event $("#myTable thead").click(function() { //alert($(this).attr("id")); $(".productsTable").remove(); var minus = $(".hideProducts"); $.each(minus,function(){ $(this).html("[+]"); $(this).attr("class","showProducts"); }); }); // call the tablesorter plugin $("table").tablesorter({ theme: 'blue', // initialize zebra striping of the table widgets: ['zebra','staticRow'], // change the default striping class names // updated in v2.1 to use widgetOptions.zebra = ["even", "odd"] // widgetZebra: { css: [ "normal-row", "alt-row" ] } still works widgetOptions : { zebra : [ "normal-row", "alt-row" ] } }); }); google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var a = new Array(); var html = ""; var table = document.getElementById("myTable"); for (var i = 0, row; row = table.rows[i]; i++) { a[i] = new Array(); for (var j = 0, col; col = row.cells[j]; j++) { a[i][j]=row.cells[j].textContent; if(j>0 && i > 0){ a[i][j] = a[i][j].replace(".", ""); a[i][j] = parseFloat(a[i][j].replace(",", ".")); } } } // Calculate the width and height of the Array var w = a.length ? a.length : 0, h = a[0] instanceof Array ? a[0].length : 0; // In case it is a zero matrix, no transpose routine needed. if(h === 0 || w === 0) { t=[]; } /** * @var {Number} i Counter * @var {Number} j Counter * @var {Array} t Transposed data is stored in this array. */ var i, j, t = []; // Loop through every item in the outer array (height) for(i=0; i