Random Quote Generator- not able to retrieve new quotes

I’m working on the random quote generator project and the jquery code works in my text editor, but it’s not working in codepen. Somebody please tell me what’s going on here? Thanks!!!

See the Pen QGen

I don’t think the API is working. Tried visiting http://api.forismatic.com/api/1.0/ and got ‘Error: wrong method.’ Not sure why it would work in your text editor though.

1 Like

People need to read their browser consoles:

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

Codepen requires https. Change your url to: url: 'https://api.forismatic.com/api/1.0/',


That’s right- Thank you so much!!!

Thank you - changing the url to: https://api.foramatic.com/api/1.0/ solved the issue :slight_smile: