I have done my research and looked at tons of things, but none of them are working for me. This is my code at the moment. The original image displays fine, but nothing happens when I hover.
Javascript (In <head>)
<script>
function onHover()
{
$("#news").attr('src', 'img/newsHover.png');
}
function offHover()
{
$("#news").attr('src', 'img/news.png');
}
</script>
HTML
<img id="news" onmouseover="onHover();" onmouseout="offHover();" height="100px" width="100px" src="img/news.png"></a>
"$" is not definedand I changed the path to remove the first / but it still wouldn't work. .hover doesn't work either, that is what I first tried. Maybe the problem is with .attr?