I have jquery carousel on my page with a few images. I find current image, get data-parameter and use it as background-image value for div
slideItems.removeClass('current');
slideItems.eq(currentSlide).addClass('current');
var current_image_src = $('.carousel .slideItem.current img').data('bg-image-src');
$('.conteiner').css('background-image', 'url(http:' + current_image_src + ')');
but with this code background image changes sharply.
Is there any way to change background image gradually using animate()
?