JSFiddle - React, Tailwind, and code Playground

HTML

<div class="kitty"></div>

CSS

.kitty {
    background: white url("http://placekitten.com/300/400") repeat 0 0;
    height: 400px;
    width: 300px;
}

JavaScript

var $d = $("div");

// click the div, show the element inside
$("div").click(function() {
    $(this).animate({opacity: 0}, 500, function() {
        $(this).css("background-position", "-300px 0");
        $(this).animate({opacity: 1}, 500);
    });
});