Tutorial :Jquery slide from right to left


I have the follow code:

$("#headerimg" + currentContainer).slideUp(function() {    setTimeout(function() {      $("#headertxt").slideUp(100).css({"display" : "block"});      animating = false;    }, 500);  });  

Now the pictures animate from bottom to top. But i want that the picture, slide from right to left. What in the code i must change?


Here is a great tutorial to slide elements in different directions.

from jQuery - slide right to left?


There is no build-in method like "slideLeft" in jQuery. So you either have to write a little plugin like

$.fn.slideLeft = function(speed){       return this.each(function(){          var $this = $(this);          $this.animate({'width': '0px'}, jQuery.fx.speeds[speed] || 200);       });  };  

or you have to look for an already existing plugin out there.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »