Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This function refreshes the player rankings when the last stat is toggled
- function refreshRankings( stat_id ) {
- var url = "/pullrankings.php?s=" + stat_id + "";
- $.getJSON( url, function(data){
- for ( statistic_id in data ) {
- for ( value in data[ statistic_id ] ) {
- RankPlayers( data[ statistic_id ][ value ] );
- }
- }
- } );
- }
- var RankPlayers = function(array) {
- console.log(array);
- var div = $('<div id="rankings">'+ array +'</div>');
- $('#rankings').replaceWith( div );
- }
Add Comment
Please, Sign In to add comment