I have the following jQuery code to replace an image when you hover over with the mouse but it doesn't seem to be working. What is wrong with the code below?
$(function() {
$("div.delete img")
.mouseover(function() {
$(this).attr("src", "../../images/comment-hover-del.png");
})
.mouseout(function() {
$(this).attr("src", "../../images/comment-del.png");
});
});
This is my HTML:
<div class="delete" id="26"><img src="../../images/comment-del.png" border="0"></div>