The API gives each advice a number so you can reference that object inside the advice heading a adviceNumber.textContent = #ADVICE ${data.slip.id};
so the API does the changes automatically instead of using js to manually change the numbers.
There is also a small problem in your code. The quotes in your website do not change even after waiting for 5 minutes. This is because the quotes are stored temporarily before being removed from cache memory. In the docs, it says 2 seconds but ideally it is more than that. I'd advice you set cache: 'no-cache' manually when using the API so data isn't cached at all. Your UI looks splendid. All that is left is the problem with caching the quotes. I hope this helps XD
Marked as helpful
@daniel-ribas
Posted
@DennyIsNaive Wow, thanks. That's really helpful :D