Hi guys,
I am trying to tweet the random quote i get from an API and i don’t know what is wrong.
i declare a global variable var tweet_quote= $(’.quote ‘).text and use it in the the JQuery code to tweet it. When i try to console.log this varieble everything goes fine. When h try to open the window(
$(’#tweet’).on(‘click’, function(){
window.open("https://twitter.com/intent/tweet="+tweet_quote);
});
) this way i cannot tweet it.
Here is my codepen project :http://codepen.io/Chrimors/pen/JWpKxQ?editors=1111
Thanks for the help, Christos