Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var setState = function( stateObject ) {
- console.log( "Set this state:" );
- console.log( stateObject );
- $( stateObject.players ).each( function(i,player){
- $( 'input:eq('+i+')' ).val( player );
- } );
- $( '#stat-'+stateObject.statistic_id ).attr( 'checked', 'checked' );
- };
- var url = '/setState.php?unique_id=' + location.hash.substring( 1 );
- console.log( url );
- $.getJSON( url, function(resp){
- setState( resp );
- console.log( resp );
- } );
Add Comment
Please, Sign In to add comment