Click to animate position


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $('.next').click(function() {
  2. $('#foobar').animate({left: '-=1000px'}, 200);
  3. });
  4. $('.previous').click(function() {
  5. $('#foobar').animate({left: '+=1000px'}, 200);
  6. });

Report this snippet


Comments


You need to login to view comments.