Why isn't my JS working in CodePen (Random Quote Machine)

Why isn't my JS working in CodePen (Random Quote Machine)
0.0 0

#1

Ughh. I’m getting so frustrated. I worked through this challenge in my own text editor (Atom), testing out functionality in chrome as I went (it worked fine in my browser!). But when I transferred everything over to CodePen my jQuery wouldn’t load and my quotes no longer appear. Can anyone let me know what’s up? :confused:

``https://codepen.io/rbuxx/pen/mmEpMN


#2

For debugging, open your Developer Tools, look into console and see what the message is:

VM5112 jquery.min.js:4 Mixed Content: The page at 'https://codepen.io/rbuxx/pen/mmEpMN' was loaded over HTTPS, but requested an insecure script 'http://api.forismatic.com/api/1.0/?
jsonp=jQuery31108545171575660713_1492906490902&method=getQuote&lang=en&format=jsonp&_=1492906490903'. This request has been blocked; the content must be served over HTTPS.

aha… found the reason.
So now, If you access your codpen url using only http, it works.


#3

Ah-hah! I see. Thank you! :blush: