Is it possible to achieve a smooth transition effect for changing the background image on hover of a button using the code below?
$(function() {
$('#a').hover(function() {
$('.contenitoreindex').css('background', 'url(immagini/img1.jpg) no-repeat center center');
}, function() {
// reset the background color on mouseout
$('.contenitoreindex').css('background', '');
});
});
I am wondering if there is a way to apply a slow fade effect when changing the background image. Any suggestions would be appreciated. Thank you!