JSFiddle - React, Tailwind, and code Playground
by joepenzo
HTML
<script src="https://rawgithub.com/apolinario/spriteOnHover/master/plugin/jquery.spriteOnHover-0.2.5.min.js"></script>
<a class="playbtn"></a>
<br><br><br><br>
<a class="playbtn blauw"></a>
CSS
.playbtn {
background-repeat: no-repeat;
font: 0/0 a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
z-index: 1;
position: relative;
display: block;
float: left;
cursor:pointer;
/* width and height of each frame */
width: 51px;
height: 58px;
background-image: url(http://joepsuijkerbuijk.com/development/img/playbtn-spritesheet.jpg);
}
.playbtn.blauw {
background-image: url(http://joepsuijkerbuijk.com/development/img/playbtn-spritesheet-blauw.jpg);
}
JavaScript
$(document).ready(function() {
$( ".playbtn" ).each(function( index, element ) {
$(element).spriteOnHover({
orientation: 'vertical'
});
});
});