title: jquery animate slider onClick event
body: <p>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:</p>
  
  <pre><code>$('.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');
      }
  </code></pre>
  
  <p>I am stuck at this point. Please help. Thanks in advance.</p>