I have a div that contains a small image and a span element with info about the image.
I have a dynamic menu that changes the image src and the text for each option.
This works the very first time I click on any of the menu items. The problem is after subsequent menu clicks the image and the text change as expected, but the image does not display. If I right click where the image is and choose Show Picture, the image appears.
The images are preloaded and stored in objects. The code to swap the image is simply
Any ideas?
I have a dynamic menu that changes the image src and the text for each option.
This works the very first time I click on any of the menu items. The problem is after subsequent menu clicks the image and the text change as expected, but the image does not display. If I right click where the image is and choose Show Picture, the image appears.
The images are preloaded and stored in objects. The code to swap the image is simply
Code:
var d = document.getElementById('coachImg');
d.src = coachObj.thumbnail.src;
Any ideas?