I\'m trying to change the contents of a div when it\'s hovered over using JQuery. I\'ve seen answers on stack overflow, but I can\'t seem to get it working.
I\'ve tried
You cannot call reference a dom with pure Javascript and them manipulate it with jQuery - it will not work.
Try this:
$( "#imgDiv" ).mouseover(function() {
$("#titleDiv").text("hovering");
});
The titleDiv
id has to be referenced in your code using "#", then the id name.
Also, use $("#name_of_id").text("your content")
instead of .textContent()