Here is an example of an image element that keeps getting new images by JavaScript
imgcar.html
<xi:include></xi:include>
Check it
Here is an example of an image carousel by JavaScript
imgcar1.html