My goal here is to take an example from my book that displays different book covers upon button presses. The new part I need to add is to add an event listener that displays the title of the book when you hover over an image.
Note** I am using the title attribute to achieve showing the title when hovering, but I have to have the title text display under the book that has been hovered over
Why won't this work?
document.addEventListener("mouseover", function(){
document.getElementById("image").innerHTML = title;
});
I've included a link to my website as that would be easier than pasting all of the code. I am very new to using the DOM and AJAX in general. I'm not looking for any answers, just some help on understanding what I may be doing wrong.
http://ualr.edu/gawalker1/16%20CH%20HW/PullImagesOntoPage.html