Random Quote Generator Tweet Button not working

Random Quote Generator Tweet Button not working
0

#1

Please help, I’ve been working on this project all day and I can’t get the tweet button to work. It does not open up to another page. I’ve tried target _blank and window.open and nothing happens. What am I missing? Here is my code: https://codepen.io/Wongala/pen/ZKoMWN


#2

Have you got a pop up blocker installed? It’s opening a new window when I try it on latest Safari.


#3

Thanks for responding. I’ve still been working on it and made var randomQuote and author globally instead of locally and that somehow allowed the new window. Now its just saying undefined


#4

It’ll say undefined until you click the button because randomQuote only gets defined when the user clicked ‘New Quote’.


#5

Ahhh, Thanks so much!