To start, assign an id of 'rootEl' to the ui element.
<ui id="rootEl">
</ui>
Next, use this JavaScript:
var rootEl = document.getElementById('rootEl');
function appendStuff() {
var listItem = document.createElement('li');
var videoThumbnail = document.createElement('div');
var myImage = document.createElement('img');
var videoDesc = document.createElement('div');
var videoDate = document.createElement('div');
videoThumbnail.setAttribute('class','videoThumbnail');
myImage.src = "./img6.jpg";
videoDesc.setAttribute('class','videoDesc');
videoDate.setAttribute('class','videoDate');
videoDesc.innerHTML = "Lorem ipsum dolor sit amet";
videoDate.innerHTML = "02/07/2012";
videoThumbnail.appendChild(myImage);
videoThumbnail.appendChild(videoDesc);
videoThumbnail.appendChild(videoDate);
listItem.appendChild(videoThumbnail);
rootEl.appendChild(listItem);
}
Finally, add a button to trigger the function and append the content:
<button onclick="appendStuff()">click me</button>
Now, each time the button is clicked, the specified content will be added. To prevent duplication, consider customizing the function or hiding/disabling the button. It's recommended to research independently before seeking further assistance.