D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
jcnesci
Full window
Github gist
Open311 JSONP test #1 - using jQuery
<!DOCTYPE html> <html> <meta charset="utf-8"> <head> <title>DudleyD3 - Sosolimited</title> <link rel="stylesheet" type="text/css" href="css/style.css"> </head> <body> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type="text/javascript" charset="utf-8"> // Based on this jQuery example: https://www.sitepoint.com/jsonp-examples/ (function($) { var url = 'https://mayors24.cityofboston.gov/open311/v2/services.json?callback=?'; $.ajax({ type: 'GET', url: url, async: false, jsonpCallback: 'jsonCallback', contentType: "application/json", dataType: 'jsonp', success: function(json) { console.dir(json); }, error: function(e) { console.log("error: "+ e.message); } }); })(jQuery); </script> </body> </html>
https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js