/ Published in: JavaScript
Set the background of the division that is the container to the image of the item that appears.
Expand |
Embed | Plain Text
$j(function() { $j(".anyClass").jCarouselLite({ btnNext: ".next", btnPrev: ".prev", circular: true, visible: 1, scroll: 1, start: 1, auto: 8500, speed: 0, beforeStart: function(a) { $j(a).parent().fadeTo(1000, 0); var bg = $j(a).find('img').attr('src'); $j('.anyClass').css({ backgroundImage: "url("+bg+")" }, 1000); }, afterEnd: function(a) { $j(a).parent().fadeTo(1000, 1); } }); });
You need to login to post a comment.
