EDIT: You included jquery-ui and NOT jquery in your codepen, hence it doesn't work because of that! Twitch changed its API and you need to register a clientID if you want to make any requests to their API. You can go to this webpage and follow the instructions there. What is happening to your requests right now is a 400 error each time you make a request. Quoting the API documentation:
To identify your application to the API, every request must include your application’s client ID, either explicitly or implicitly by including an OAuth token. If you use an OAuth token in your request, the API figures out the client ID for you.
Requests without a client ID fail with an HTTP 400 error.
To get a client ID, register a developer application on the
connections page of your Twitch account. Once you have your client ID,
you can send it via:
Request header (Client-ID: XXXXX) Query-string parameter
(https://api.twitch.tv/kraken/users/44322889?client_id=XXXXX)
Old post, for sake of full disclosure:
You should upload your HTML to make sure that you actually included the files correctly.
I tried this code, which is like yours, in codepen and everything works fine
$(document).ready(function(){
$.getJSON('https://jsonplaceholder.typicode.com/posts/1',function(result){
console.log("success");
});
});
I think you might have a problem with a CDN where jquery is at, but before that, given that you have a reference error and jQuery is not defined. You can look at this pen I wrote for you:
Codepen example
If you upload your HTML, like you did in the comments under your post, you will notice that this:
<div class="container">
<div id="header" class="text-center">
<h1>TwitchTV JSON API</h1>
<h2>Free Code Camp</h2>
<h3 id="fccStatus"></h3>
</div>
<div class="row">
<h1>
<div class="col-md-4">
Logo:
</div>
<div class="col-md-4">
Display Name:
</div>
<div class="col-md-4">
Status:
</div>
</h1>
</div>
<div id="followerInfo">
</div>
</div>
Is not friendly formatted, which is fine for now, but also doesn't include any mentions to any javascript or jquery files. Where are the DOCTYPE, html, body, head tags?
You are missing all the script tags that connect your script and enable jQuery to run.
<html>
<head></head>
<body>
<div class="container">
<div id="header" class="text-center">
<h1>TwitchTV JSON API</h1>
<h2>Free Code Camp</h2>
<h3 id="fccStatus"></h3>
</div>
<div class="row">
<h1>
<div class="col-md-4">
Logo:
</div>
<div class="col-md-4">
Display Name:
</div>
<div class="col-md-4">
Status:
</div>
</h1>
</div>
<div id="followerInfo">
</div>
</div>
<script src="/path/to/jquery.js"></script>
<script src="/path/to/your-script.js"></script>
</body>
</html>
Also, since you are doing the FCC API Challenge, you might want to refer to this tutorial post, just if you get stuck tho, otherwise it doesn't make sense. FCC Twitch API