Random quote machine not working - help?

Random quote machine not working - help?
0

#1

Hi all. Just finished coding the javascript for my random quote machine (or so I thought), but the new quote button doesn’t do anything.

https://codepen.io/kaydeejay/pen/baBerY

What am I missing here? Please and thank you.


#2

@KayDeeJay: Hi Kevin

I looked at your pen using Chrome. When I press Ctrl-Shift-J to open the developer tools, there’s an error in your JavaScript:

Uncaught ReferenceError: $document is not defined

Does that help?

Oh yes, can I also mention that JavaScript is case sensitive? Math is not the same as math.


#3

Instead of$(.quote).text(//randomQuote)
Try classic JavaScript

Document.getElementById(//quote box id).innerHTML=//randomQuote


#4

Instead of $document.ready(function(){ which is invalid JQuery syntax, you can use $(document).ready(function(){

Also, @petersim gave you a good hint regarding Math vs math.