jquery: API JSON example.
I have written the following code (as below) for an API JSON example but I cannot seem to output any information on screen? Moreover, if I use
https://jsonplaceholder.typicode.com/posts/1 in my code it will function and output an answer?
html:
<h1>JSON Example</h1>
<span id="output"></span>
Jquery:
$('#output").text(data.title);
});