I have multiple background-images that change on hover.
Example:
.class1 {
background: url(/img/img-1.jpg) no-repeat top center;
}
.class1:hover {
background: url(/img/img-2.jpg) no-repeat top center;
}
The images flicker now, as they are loaded the second you hover over them. I've tried using sprites, but that doesn't work, as the images change size for mobile devices.
Any ideas? Could be css or jquery, doesn't matter much