Dynamic content for twitter button

Hi everyone - I am really struggling with getting the tweet button on my random quote machine to populate a tweet with the randomly generated quote.

Have tried updating the button’s attribute with jQuery but haven’t been successful. I understnad that it might have something to do with all the scripts in my head loading before I updated the button but don’t understand how to work around this.

Here is my codepen: https://codepen.io/lucylikescode/full/aGmGVV

Would appreciate some pointers on this!

Think you should use something like https://twitter.com/intent/tweet?text=' ...... instead of share

Hey Sorin - Thanks for the tip! Did update the href to /intent/tweet instead of /share but not seeing any difference in the behaviour :frowning:

And now it works! Thanks for the tip Sorin - using https://twitter.com/intent/tweet?text= instead of the standard twitter button made things much easier :slight_smile:

Glad you made it working. :+1: