This is returning an XML file and normal .get is not allowed, what am I doing wrong?
Here’s their guide: http://svc.metrotransit.org/NexTrip/help/operations/GetRoutes
jQuery(document).ready(function($) {
var url = "http://svc.metrotransit.org/NexTrip/Routes?callback=?";
$.getJSON(url, function (data) {
$('#content').append(data);
});
});
You need to explicitly request the response format to be JSON, by adding
format=jsonto the query string:DEMO.