Question: I have the following jquery code:

```
$(document).ready(function() 
{
    $('button').click(function() 
    {
        $.getJSON('http://world.needforspeed.com/SpeedAPI/ws/game/nfsw/server/status?output=json', function(json)
        {
            alert("Entered getJSON");

            $("#output").append("working...");            
            if(json.status.indexOf("success")===0)
            {
                alert("success");
                $.each(json.results, function(i, data) 
                {
                    $("#output").append(data.text);
                });
            }else
            {
                alert("Failed to load url");
            }
        });
    });
});

```

The json that is pulled from the url looks like:

```
{"worldServerStatus": {
 "customMessage": "",
 "lastChangedDate":  {
  "date": 31,
  "day": 4,
  "hours": 17,
  "minutes": 48,
  "month": 4,
  "nanos": 0,
  "seconds": 32,
  "time": 1338486512000,
  "timezoneOffset": 0,
  "year": 112
 },
 "localizedMessage": "The servers are currently up and running.",
 "message": "ALL_SYSTEMS_GO",
 "status": "UP"
}}

```

My jquery just refuses to enter the $.getJSON function, the "enetered getJSON" alert doesn't fire.

What is wrong?

Solved. Thank you all :)

Answer: 
Did you check the console? You might be suffering from a access-control-origin error

[jQuery.getJSON - Access-Control-Allow-Origin Issue](https://stackoverflow.com/questions/6396623/jquery-getjson-access-control-allow-origin-issue)
You can not fetch JSON from another domain unless they support [CORS](https://developer.mozilla.org/en/http_access_control) because of the [same origin policy](https://developer.mozilla.org/En/Same_origin_policy_for_JavaScript). 

Does the api support [jsonp](http://api.jquery.com/jQuery.getJSON/#jsonp)?