I have this code in a function, and want to shorten it - it applies the same style to every item in an array.
document.getElementById(divsArray[0]).style.visibility='hidden';
document.getElementById(divsArray[1]).style.visibility='hidden';
document.getElementById(divsArray[2]).style.visibility='hidden';
document.getElementById(divsArray[3]).style.visibility='hidden';
NO answer to date worked (Because I am looping thru the code??)
Resolved it by setting only the previously displayed slide visibility to hidden
x=i;
i=i+1;
document.getElementById(divsArray[x]).style.visibility='hidden'