Twitter box is not auto filling

Twitter box is not auto filling
0

#1

here’s my code : https://codepen.io/buzz_lightyear/pen/BmdzaZ?editors=1010

i don’t know what i’m doing wrong…but the twitter box is not auto filling with quotes after clicking…

where the changes are needed?


#2

Check your browser’s console (Ctrl+Shft+I) after clicking the Twitter button. You have a problem with your code. The error is randomNumber is not defined. Why? Because the only place randomNumber is defined is within the scope of the makeId function. My recommendation is recreate the html of the div with id=“icon” within the makeId function, then you will not need a click event for the div. Then all you have to do is make a call to makeId within the first line of your $(document).ready callback function, so the Twitter button has the quote information.


#3

i added the onclick = makeId() handler to the icon div … so how can i add makeId() in my $(document).ready first line without changing the fadeIn() fadeOut() animation.


#4
$(document).ready(function() {
  makeId();
  $("#press > button").click(function() {