I have this code segment that takes all the pictures in the page and goes through each picture showing it.
var index=0;
function changeBanner(){
[].forEach.call(document.images,function (v,i) { document.images[i].hidden = i!==index});
index = (index+1) % document.images.length;
}
window.onload = function () {
setInterval(changeBanner, 1000)
};
I was wondering if there was any way to make this local to only one 'div' tag.
Thank You!