I am writing a jQuery call to retrieve JSON data from the memegenerator.net API. However, using the code below, I get a Uncaught SyntaxError: Unexpected token : error whenever I test it in Chrome. I tried removing the callback=? and that threw another error.
Whenever I go to the URL directly, it comes back fine.
JSLint in JSFiddle declares the returned JSON as valid.
Any ideas on how to make this call successful?
<script>
$(document).ready(function() {
$.ajax({
type: 'GET',
url: 'http://version1.api.memegenerator.net/Instances_Select_ByNew?languageCode=en&pageIndex=0&pageSize=12&urlName=Insanity-Wolf?callback=?',
dataType: 'json',
success: function() {
console.log('Success!');
},
error: function() {
console.log('Uh Oh!');
}
});
});
</script>