Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery: Slide left and slide right

I have seen slideUp and slideDown in jQuery. What about functions/ways for sliding to left and right?

like image 482
Sarfraz Avatar asked Mar 09 '10 18:03

Sarfraz


People also ask

How to slide left and right using jQuery?

Answer: Use the jQuery animate() method There are no such method in jQuery like slideLeft() and slideRight() similar to slideUp() and slideDown() , but you can simulate these effects using the jQuery animate() method.

How to slide image left to right in jQuery?

$('image'). show("slide", { direction: "right" }, 1200);

How to use slideUp and slideDown in jQuery?

The jQuery slideToggle() method toggles between the slideDown() and slideUp() methods. If the elements have been slid down, slideToggle() will slide them up. If the elements have been slid up, slideToggle() will slide them down. $(selector).

How to make a div slide down with jQuery?

The slideDown() method slides-down (shows) the selected elements. Note: slideDown() works on elements hidden with jQuery methods and display:none in CSS (but not visibility:hidden). Tip: To slide-up (hide) elements, look at the slideUp() method.


1 Answers

You can do this with the additional effects in jQuery UI: See here for details

Quick example:

$(this).hide("slide", { direction: "left" }, 1000); $(this).show("slide", { direction: "left" }, 1000); 
like image 104
Nick Craver Avatar answered Sep 17 '22 01:09

Nick Craver