Help needed on random quote generator

Help needed on random quote generator
0.0 0

#1

Hi all.

As the title implies, I am having issues with the random quote generator. I have tested my javscript code with a simple testing site here https://codepen.io/chawin/pen/jmVRMg, and it displays the words perfectly fine.

However, when I transfer the code to the main website, it does not show anything. You can see the page here. https://codepen.io/chawin/pen/BRLdGo

Thanks for taking your time to read! Any help/feedback is greatly appreciated. In the meantime, I will have to read up more on ajax and Json so that I can create some of the cool things you guys are doing.


#2

You tried to include the bootstrap.min.css file where you should be importing the JavaScript in Codepen.


#3

Hello! :slight_smile:

You have a typo in the function name that gets called on button’s click.

HTML:
<button onclick="getQuotes()" ...

JS:
function getQuote() { ... }

Fix the typo, you are good to go. Also remove the Bootstrap CSS file from your pen settings.

All the best! :slight_smile: