Hi, folks!
How do I get my API information to append into separate Divs? Currently I have them just dumped into one div, and it looks messy and untidy. I want them to look neat and organized. Can you possibly point me in the right direction towards achieving this?
Here is a link to my project: https://codepen.io/IDCoder/pen/oVVbOq
Here is my particular area of code as of now:
‘’$(’.displayOutPutHere’).append(’
’+channel+’ is '+target + streamContent);"
This thread may be helpful:
i want to display the data from an API and i have the code but my question is;
is there any short and basic way to write document.getElementById part with a for loop or sth else. because it is like a repeating process.
HTML code
<div>
<div id=“name1”></div>
<div id=“surname1”></div>
<img src="" alt="" id=“image1”>
</div>
<div>
<div id=“name2”></div>
<div id=“surname2”></div>
<img src="" alt="" id=“image2”>
</div>
<div>
<div id=“name3”></div>
<div id=“surname3”></div>
<img src=…
@DanCouper , thankyou. I’m bout to check that out right now!
1 Like