JSFiddle - React, Tailwind, and code Playground
HTML
<img id="img2" src="http://www.thesearchagents.com/wp-content/uploads/2013/11/Google-Search.jpg" alt="">
JavaScript
var url = 'http://velocityagency.com/wp-content/uploads/2013/08/go.jpg';
var urlOriginal = 'http://www.thesearchagents.com/wp-content/uploads/2013/11/Google-Search.jpg';
$(document).ready(function () {
$('#img2').hover(function () {
$this = $(this);
$this.fadeOut(function () {
$this.attr("src", url);
});
$this.fadeIn();
}, function () {
$this = $(this);
$this.fadeOut(function () {
$this.attr("src", urlOriginal);
});
$this.fadeIn();
})
})