I am having trouble with my RQM tweet button.
I am brand new to coding so I am trying to do this project as simply as I can while meeting the criteria.
I have looked at others’ projects but they were beyond my abilities.
here is what I have so far
I can get a twitter window to open but haven’t figured out how to add a variable to the link to open whichever quote is currently displayed.
You can also access it directly off the page. You put it on the page with the selector document.getElementById('quoteDisplay').innerHTML - and that works both ways. Try:
function tweetQuote(){
console.log(document.getElementById('quoteDisplay').innerHTML);
window.open("https://twitter.com/home?status=");
}
I have tried this soln and the one above but I still can’t get the quote in tweeter.
When I put the tweetQuote function in the newQuote function, I don’t get any link when clicking tweet button.
When I make them two separate functions and put quoteDisplay after the twitter url, I get the twitter window but the text box reads “[object HTMLDivElement]”
I have tried different ways to assign the quote to a variable then call for it in the tweetQuote function but I can’t figure it out.