Hello,
I am trying to generate a tweet from my random quote generator and I am stuck. Nothing happens when I click on the ‘Tweet this’ button. I read around and seems like I am doing what is commonly used:
document.getElementById("tweet").innerHTML = `<button id="tweet" onClick= "tweetQuote()"> Tweet this </button>`;
function tweetQuote(){
window.open("https://twitter.com/intent/tweet?text=" + quote + "by - " + author);
}
Can someone pls point out what I am missing. (Note: I have not made it responsive yet. Was working on functionality. pls ignore that); link https://codepen.io/remeklavya/pen/WZWOvX