'); tr.append("
" + "" + val.TeamName + " | "); tr.append("" + val.GamesPlayed + " | "); tr.append("" + val.Wins + " | "); tr.append("" + val.Losses + " | "); tr.append("" + val.Ties + " | "); tr.append("" + val.Points + " | "); tr.append("" + val.GF + " | "); tr.append("" + val.GA + " | "); tr.append("" + val.PIM + " | "); $('#tblStats tbody').append(tr); }); }); $.getJSON('https://api.rampinteractive.com/tournamentgames/getstandings2wsd/2122/1110/' + gtid + '/8747', function (data) { $.each(data, function (key, val) { /*if (key == 0) {*/ if ( val.TOTID == 0 ) { tr = $('
'); tr.append("" + val.SubDivName + " | "); $('#tblStats tbody').append(tr); } else { trt = $('
'); trt.append("" + "" + val.TeamName + " | "); trt.append("" + val.GamesPlayed + " | "); trt.append("" + val.Wins + " | "); trt.append("" + val.Losses + " | "); trt.append("" + val.Ties + " | "); trt.append("" + val.Points + " | "); trt.append("" + val.GF + " | "); trt.append("" + val.GA + " | "); trt.append("" + val.PIM + " | "); $('#tblStats tbody').append(trt); } }); }); if (8747 > 0) { $('#tblStats').show(); $('#tblPlayerStats').show(); $('#tblPlayerStats tbody').empty(); $.getJSON('https://api.rampinteractive.com/tournamentplayers/getplayerstats/2122/1110/'+ gtid + '/8747', function (data) { $.each(data, function (key, val) { var lname = val.lname; var fname = val.fname; var displayName = ""; displayName = (lname != "" ? lname : ""); displayName += (fname != "" ? (displayName != "" ? ", " : "") + fname : ""); var jersey = ""; if (val.jersey != null) { jersey = val.jersey; } tr = $('
'); tr.append("" + jersey + " | "); tr.append("" + displayName + " | "); tr.append("" + val.GP + " | "); tr.append("" + val.G + " | "); tr.append("" + val.A + " | "); tr.append("" + val.PTS + " | "); tr.append("" + val.PPG + " | "); tr.append("" + val.SHG + " | "); tr.append("" + val.GWG + " | "); tr.append("" + val.PIM + " | "); $('#tblPlayerStats tbody').append(tr); }); }); $('#tblPlayerStats').show(); } else { $('#tblPlayerStats').hide(); $('#tblGoalieStats').hide(); } } else { $('#tblStats').hide(); } };