I am brand new to jQuery.ajax so please bear with me. I am trying to create a form that validates addresses against a public api, data.citycofchicago.org. If I hit the URL (http://data.cityofchicago.org/api/views/i6bp-fvbx/rows/1478.json) directly, I see the json formatted page. However, I don't seem to be getting a response using ajax. Here is my code:
<script LANGUAGE="JavaScript" SRC="/scripts/jquery-1.7.1.js"></script>
<script type="text/javascript">
$('document').ready(function(){
$('#button').click(function(){
$.ajax({
type: 'get',
url: 'http://data.cityofchicago.org/api/views/i6bp-fvbx/rows/1478.json',
success: function() {
alert('Got a response!');
}
});
});
});
If I change the URL to an internal page on my site, I see the alert box. When I use this URL, I get no response box. I've tried setting the datatype to json and jsonp but nothing. Any ideas?
Thanks.