Random Quote Generator review and issues

Random Quote Generator review and issues
0.0 0

#1

I finally was able to fish this one .I used the forismatic API. Your feedback is welcome!

While coding the tweet link with the quote text, I had to code it in the twitter link onclick event as specified in another forum discussion.
When I tried to modify the href attribute in the success function like this code below it did not work. I am trying to figure out why.

function handleData(data)
{
$("#quoteText").text(data.quoteText);
$("#author").text(data.quoteAuthor);
quote = data.quoteText;
$("#twitterLink").href = “'https://twitter.com/intent/tweet?text=” + encodeURIComponent(quote));
}


#2

Why is there an extra “)” at the end?

$("#twitterLink").href = “'https://twitter.com/intent/tweet?text=” + encodeURIComponent(quote));