Feedback on Random Quote generator (beginner)

Guys, I need some feedback on my Random Quote machine:

Note: You needn’t make me happy with nice comments! :stuck_out_tongue:

The tweet button goes on top of the quote button on smaller screens. And the box doesn’t grow in height to accommodate longer text.

You could have passed the changeQuote function to $(document).ready(), instead of writing that function twice.

$(document).ready(changeQuote);

You can use template literals for cleaner HTML strings.

quoteText.innerHTML = `<i>${currQuote}</i><br><br>-<small>${currAuthor}</small>`;

I think it’s better to clear quoteText (or place a loading icon) while waiting for new quotes, instead of assigning it the current quote.

1 Like

Thank you soo much for your feedback…!!
I’ll work on the improvements…!

  • So what would be the best way to size elements based on their content ?
    would display: inline-block do the trick ?
  • I didn’t know about template literals! will look into it now!