"Build a Random Quote Machine" tweet button issue

"Build a Random Quote Machine" tweet button issue
0

#1

HI Everyone, I have spent much time with the “Build a Random Quote Machine”.
I am at a point that I really don’t understand how to make work the tweet button.
I tried just to use JS and make it very simple but still doesn’t work…

Here the link. Any advice is much appreciated!

https://codepen.io/AndreusSH/pen/EXRmdJ


#2

Should be text= in tweet URL


#3

Sorry but I don’t understand


#4

The last line should be

window.open("https://twitter.com/intent/tweet?text=" + document.getElementById("quoteDisplay").innerHTML)

#5

thanks a lot for your help!