Problem with tweet button on random quote generator [Solved]

Problem with tweet button on random quote generator [Solved]
0

#1

I am having a problem with the tweet button on my random quote generator. When I click the button the text in the tweet box says undefinedudefned. I’m pretty sure I missed something important but I’m not sure what it is. Please help me. Here is my page http://codepen.io/johnwm211/pen/NAvEJj


#2

Your code:

window.open('http://twitter.com/intent/tweet?text=' + ('#quote').text + ('#author').text);

You forgot $ before (#quote) and (#author). Then add () after .text.

Adding a space between the quote and author doesn’t hurt.


#3

Worked perfectly thanks a lot. I figured I was overlooking something simple.