# Why quote API doesn't load

**URL:** <https://forum.freecodecamp.org/t/why-quote-api-doesnt-load/105301>\
**Category:** General\
**Created:** [April 12, 2017, 12:05pm UTC](https://forum.freecodecamp.org/t/why-quote-api-doesnt-load/105301 "2017-04-12T12:05:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmedaltour](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@ahmedaltour](https://forum.freecodecamp.org/u/ahmedaltour)\
**Post date:** [April 12, 2017, 12:05pm UTC](https://forum.freecodecamp.org/t/why-quote-api-doesnt-load/105301/1 "2017-04-12T12:05:02Z")

</div>

Hello Fellows

Could anybody tell me why my code doesn’t show anything in the console when trying to use this API

```auto
<button id="nextQuote">press</button>

```

JavaScript code

```auto

$(document).ready(function(){
$("#nextQuote").on("click",function getData(quote,author){
$.getJSON("http://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=jsonp&jsonp=?", function(json) {
  
   quote = json.quoteText; 
   author = json.quoteAuthor; 
  console.log(quote);

 
  });   
 });   
});

```

would appreciate your support

---

<div class="post-metadata">

**Author:** ![honmanyau](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/honmanyau/32/45787_2.png) [@honmanyau](https://forum.freecodecamp.org/u/honmanyau)\
**Post date:** [April 12, 2017, 12:09pm UTC](https://forum.freecodecamp.org/t/why-quote-api-doesnt-load/105301/2 "2017-04-12T12:09:15Z")

</div>

Hello there!

I just copied and pasted your code as-is into CodePen and it’s printing quotes in the console just fine. Have you double-checked that jQuery is actually available to the project that you are working on?

I hope that helps!

---

<div class="post-metadata">

**Author:** ![ahmedaltour](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@ahmedaltour](https://forum.freecodecamp.org/u/ahmedaltour)\
**Post date:** [April 12, 2017, 12:14pm UTC](https://forum.freecodecamp.org/t/why-quote-api-doesnt-load/105301/3 "2017-04-12T12:14:56Z")

</div>

@honmanyau yes it is attached could you please share with me your codepen link

---

<div class="post-metadata">

**Author:** ![michal9909](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/michal9909/32/65875_2.png) [@michal9909](https://forum.freecodecamp.org/u/michal9909)\
**Post date:** [April 12, 2017, 12:38pm UTC](https://forum.freecodecamp.org/t/why-quote-api-doesnt-load/105301/4 "2017-04-12T12:38:00Z")

</div>

Have you attached jQuery like this:

 ![](https://global.discourse-cdn.com/freecodecamp/original/3X/0/e/0e8f9e24a12edbfb09ae1ff6499326b90c4a756d.jpg)

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 17, 2021, 8:52pm UTC](https://forum.freecodecamp.org/t/why-quote-api-doesnt-load/105301/5 "2021-01-17T20:52:57Z")

</div>

Closed on January 17, 2021, 8:52pm UTC


