I have this HTML:
Intermediate steps
→
document.querySelector returns the first element within the document thus the error. you probalbly want to try: document.querySelectorAll
var elements = document.querySelectorAll(".staticStep img");
elements[0].src =.....
elements[1].src =.....
elements[2].src =.....
Or you could use jQuery instead.