Hey,
I agree with you that ‘successful output’ looks better
Take a look at this, maybe you’ll find something usefull.
Here is an working example from above threat Edit fiddle - JSFiddle - Code Playground
If it still not work for you, then we need a repo