Guest User

Untitled

a guest
Aug 16th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. // This function refreshes the player rankings when the last stat is toggled
  2. function refreshRankings( stat_id ) {
  3. var url = "/pullrankings.php?s=" + stat_id + "";
  4. $.getJSON( url, function(data){
  5. for ( statistic_id in data ) {
  6. for ( value in data[ statistic_id ] ) {
  7. RankPlayers( data[ statistic_id ][ value ] );
  8. }
  9. }
  10. } );
  11. }
  12.  
  13. var RankPlayers = function(array) {
  14. console.log(array);
  15. var div = $('<div id="rankings">'+ array +'</div>');
  16. $('#rankings').replaceWith( div );
  17. }
Add Comment
Please, Sign In to add comment