JSFiddle - React, Tailwind, and code Playground

by David Thomas

HTML

<div id="gallery">
<img src="http://davidrhysthomas.co.uk/img/dexter.png" />
</div>

CSS

#gallery {
    min-height: 185px;
    background-color: #ffa;
}

JavaScript

$('#gallery').hover(
    function(){
        // mouseover
        $(this).find("img").attr({'height':'20px', 'width':'20px'});
    },
    function(){
        // mouseout
        $(this).find('img').removeAttr('height').removeAttr('width');
        /* as of jQuery 1.7, it's possible to remove multiple attributes at once:
           $(this).removeAttr('height width'); */
    });