Here's my random quotes generator, advices needed

Hi all !

Here’s my quote generator on codepen.
What do you think ?

I’ve tried to keep the code as simple as possible, yet I haven’t managed to use the get-quote function (declared at the beginning of $(document).ready) in getJSON and $("#new_quote").clickpart to avoid code repetition.
Do you have any tip about this ?

1 Like

Some of the quotes are missing authors, there is just a blank “—” underneath.

Yep, some quotes just don’t authors, it’s from the quote file. There’s nothing I can do about it :slight_smile:

You can check if author is empty and then display something like ‘unknown author’.