Twitter button problem,the quote generator project

i hava a trouble with the twitter button it shows a blank page,can anybody help me,here is the code pen link
ps: it is not responsive i did not use bootstrap,and i will style a little the page

document.getElementById('quoteDisplay').innerHTML= quotes[randomNumber]

function tweetQuote() {
       var twitterURL = '';
       var q = $("#quotedisplay").text();

Only thing i caught was lack of consistent casing with quoteDisplay (q uses quotedisplay)

thanks a lot ,i changed the values to’ quoteDisplay’ to both of them,but i still have the same problem

Codepen does not allow you to load an external page when you click on a link directly. You can add target="_blank" to the anchor tag inside the Tweet button and a new window will open. However, you will need to add some JavaScript to put the quote into the Tweet textarea box in the new window.

thank a lot,i changed the javascript in order to put the quote into the tweet,it does not work,it shows a an empty quote,since i am beginner i have no idea how to change the code to fill the twitter box,would you
mind helping me to do it

You currently have a function called tweetQuote (see below) which returns a URL constructed using what is currently in the div with id=“quoteDisplay”.

function tweetQuote() {
  var twitterURL = '"';
  var q = $("#quoteDisplay").text();
  twitterURL += encodeURIComponent('"' + q + '"');
  return twitterURL;

You also have the following line of code.

$("#tweet").attr("href", tweetQuote());

Why don’t you put the above line inside your newQuote function, so the Tweet url gets updated each time a newQuote is displayed?

oh thanks you!!!,finaly it works!!!