Well I use a script that get a external JSON from a file, and loop thru its objects and creates the HTML on a string then after all is done, it appends in the DOM. But I would like to know if it's better to use for example: onclick html attribute (directly into the code) or add an event listener to all html objects by its classes at once with Javascript after appending to the DOM.Well I use a script that get a external JSON fr