Hey. First of all, you may want to add jQuery in the pen settings. Without it, the
.attr() method you are using to set the new URL can’t work.
Then, you can decide to keep the inline “onclick” you have in your HTML or the
.click() jQuery method. If you decide to keep the jQuery method, you’ll have to write the function call without parenthesis like so:
Finally, remove the “.twitter-share-button” class from the anchor (you can use the Bootstrap classes “btn btn-primary” to style it as a button). That class is used by the script you added (widget.js) and it’s messing things up. Also, you can’t add the hashtags via attribute, just add it to your url like so:
"https://twitter.com/intent/tweet?text=" + quote + "&hashtags=quote"