jQuery( document ).ready(function($) { $('.total-score').each(function( index ) { var teamID = $(this).attr('team-id'); var totalScore = 0; $( ".score-" + teamID ).each( function(){ if($(this).text() != '') { totalScore += parseFloat($(this).text()); } }); $(this).text(totalScore); });
$('.total-win').each(function( index ) { var teamID = $(this).attr('team-id'); //var countsplitwins = $(".result-" + teamID ).html(); total_win_count = 0; $(".result-"+teamID).each(function( ind ) { countsplitwins = $(this).html(); countsplitwins = countsplitwins.split('Win').length-1; total_win_count = total_win_count + countsplitwins;
});
$(this).text(total_win_count); });
$('.total-loss').each(function( index ) { var teamID = $(this).attr('team-id'); //var totalLoss = $( ".Loss.result-" + teamID ).length; total_loss_count = 0; $(".result-"+teamID).each(function( ind ) { countsplitloss = $(this).html(); countsplitloss = countsplitloss.split('Loss').length-1; total_loss_count = total_loss_count + countsplitloss;
});
$(this).text(total_loss_count); });
//tablesorter $(function() { $(".tablesorter").tablesorter({ sortList: [[1,1], [2,1]] }); }); });
Net Ninjas – 3-0 105-105-89 = 299
Picklebrawlers – 3-0 85-98-103 – 286
Kings & Queens – 1-2 87-105-91 – 283
Dill With It – 1-2 95-78-85 – 258
Sovereign Seniors – 1-2 55-55-95 – 205
Dink Around And Find Out – 0-3 91-71-80 – 242