Created
January 25, 2013 19:54
-
-
Save tmcw/4637321 to your computer and use it in GitHub Desktop.
CORS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
font: 20px sans-serif; | |
} | |
h1 { | |
color:red; | |
} | |
h1.success { | |
color:green; | |
} | |
</style> | |
<body> | |
<h1>FAILURE</h1> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script> | |
d3.json("http://a.tiles.mapbox.com/v3/openstreetmap.map-hn253zqn/geocode/chester%2C%20nj.json", | |
function(error, data) { | |
if (!error) { | |
d3.selectAll('h1').text('success').attr('class', 'success'); | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment