Check out this snippet of HTML code:
<div class="custom text-center threeBox ofsted">
<a class="ofsted" title="ofsted report" href="http://reports.ofsted.gov.uk/">
<img class="text-center ofstedLogo" src="images/ofsted_good_transparent.png" alt="ofsted good rating">
<h3>Ofsted</h3>
</a>
</div>
I came up with some jQuery code that changes background colors when hovering over a link:
$(".threeBox a").hover(
function(){ // Mouse Over
$(this).parent().addClass("swapBg");
},
function(){ // Mouse Out
$(this).parent().removeClass("swapBg");
}
);
It's all good, but now I want to replace the image src with 'OFSTED_good_logo.jpg' when hovering over the link. I've tried tweaking the jQuery code, but it's not working. Can anyone help with this problem please?