Howdy, Robert. I apologize for missing your earlier reply.
One thing to remember about the path is it's not JavaScript, but the browser. You're changing an <img/> element's src attribute. So it's not a JavaScript problem, but a path problem.
From looking at your original code, the <img/> elements were looking for the images in the base path "../../images/chapter.06/". But in the JavaScript, the base path was "../../images/". Notice the path in the JavaScript omitted the "chapter.06" directory. Add that directory to the path, and you should get the results you desire.
|