Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery slideUp to show the element and not hide

jQuery's slideUp effect hides the element by sliding it up, while slideDown shows the element. I want to show my div using slideUp. can anyone guide me ? thanks

like image 488
Umair Jabbar Avatar asked Mar 09 '11 07:03

Umair Jabbar


People also ask

What is the opposite of hide in jQuery?

ready(function(){ jQuery('body').

What is slideUp in jQuery?

The slideUp() is an inbuilt method in jQuery which is used to hide the selected elements. Syntax: $(selector). slideUp(speed); Parameter: It accepts an optional parameter “speed” which specifies the speed of the duration of the effect.

How do you toggle slideUp and slideDown in jQuery?

jQuery slideToggle() Method The slideToggle() method toggles between slideUp() and slideDown() for the selected elements. This method checks the selected elements for visibility. slideDown() is run if an element is hidden. slideUp() is run if an element is visible - This creates a toggle effect.

Which jQuery method is used to slide up an element?

The jQuery slideUp() method is used to slide up an element.


1 Answers

$("div").click(function () {       $(this).hide("slide", { direction: "down" }, 1000); }); 

http://docs.jquery.com/UI/Effects/Slide

like image 114
Jason Avatar answered Sep 22 '22 02:09

Jason