Twitter Button Problem

Twitter Button Problem
0.0 0

#1

I feel completely lost here and like I am really sucking at this lol. I can’t figure out why my twitter button is tweeting a blank message. Could anyone help me out by chance? I would really appreciate it! Here is my code:https://codepen.io/jlayton75/full/mxqbVo


#2

You can put this line:
`

var quote2=$("#text-p").html();

into this function:

$("#twitter").click(function(){
                                                   <--here
 window.open("https://twitter.com/intent/tweet?text=" + quote2)
})

and it will works ^^
That’s because when you assign the html to quote2 the paragraph is empty ^^ If you assign the text to the variable when you click the twitter button it will catch up the quote :slight_smile:

`


#3

Thank you very much!