Skip to content

Instantly share code, notes, and snippets.

@birkin
Last active December 15, 2015 21:39
Show Gist options
  • Save birkin/5327345 to your computer and use it in GitHub Desktop.
Save birkin/5327345 to your computer and use it in GitHub Desktop.
access json with jquery
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Request json test</title>
<script src="http://code.jquery.com/jquery-1.5.js"></script>
<script type="text/javascript">
$.get(
"http://library.brown.edu/projects/usep/inscription/CA.Berk.UC.HMA.G.8-3898/?format=json", // url, {"q":"some-query"}, data
function(data){
var data_div = $('div#showdata').html( data.writing );
},
"jsonp" // dataType
);
</script>
</head>
<body>
<div id="showdata">start</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment