Hi everyone,
I’ve got my quote machine producing quotes, but for some reason when I hit the twitter button, twitter opens to tweet, but the box doesn’t populate with my quote. Could someone take a look? Thank you!!!
Will Ferrell Movie Quote Machine
here’s my button -
<button onclick="newQuote()">New Quote</button>
this is the code for my twitter function:
$(document).ready(function () {
$('#twitter').on("click", function () {
var tweetQuote = $('quotes').text();
if (tweetQuote.length > 140) {
alert("Too many characters!")
}
var twitterURL = 'https://twitter.com/home?status=' +encodeURIComponent(tweetQuote);
window.open(twitterURL, '_blank');
})
}); //end ready