var jqxhr = $.getJSON( "http://www.dota2.com/webapi/ILeaderboard/GetDivisionLeaderboard/v0001?division=americas", function() { console.log( "success" ); }) .done(function() { console.log( "second success" ); }) .fail(function() { console.log( "error" ); }) .always(function() { console.log( "complete" ); }); // Perform other work here ... // Set another completion function for the request above jqxhr.complete(function() { console.log( "second complete" ); });

Finding your location: checking...