Issues with Random Quote Machine

I’m having two issues with this project. I built it using notepad on my computer and when I open index.html in the browser, it works perfectly but when I upload it to github or put it on codepen, I get these two issues:

  1. Upon first load, the body and quote-box background color are white with black text when they should be the same color as the button.

  2. My API isn’t generating quotes. I’m probably doing it completely wrong but it works with the code saved on my computer, just not anywhere else.

Help please!! I’d like to start tackling the twitter button but I don’t want to start that until the API works.

$(document).ready(function() {

added the line in bold and now you get the color when you load … as for the quotes nothing wrong on my end … it works for me.

1 Like

Forismatic API is no longer supported.

1 Like

A few things here Shannon. First, I spoke to the API owner of forismatic API and they have resolved the issue with their API. Second, the reason why you’re not seeing anything happen upon first load is because you didn’t call the function at the bottom. See the edited code pen here:

1 Like

Wow! Thank you so much!

1 Like

Thank you John! It looks like there was an issue with the API but it’s now been resolved.