I am trying to change the url of image on mouseover, its working fine but what I am trying is, hover on div instead of image and change the image url
following the jQuery I have:
$(".logo > img").on({
"mouseover" : function() {
this.src = 'images/logo-white.png';
},
"mouseout" : function() {
this.src='images/logo-black.png';
}
HTML
<div class="logo">
<img src="images/logo-white.png">
</div>
How do I make it on div hover? please help!