I am creating a slider using jquery animate function. The first image is moving to left and is working fine.But the next image is not quickly following the first image. It displays a blank screen for a while. This is what I have tried so far:
$('.next').live('click',function() {
$('.ac_bgimage').animate({
left:"-80em"
}, 1500 , function(){
test();
});
});
function test() {
$('.ac_bgimage').attr('src','images/2.jpg');
$('.ac_bgimage').css('left','0em');
}
I am stuck at this point. Please help. Thanks in advance.
Try this easy slider jquery plugin. This will solve your purpose.