jQuery SlideDown() 메서드
예시
모든 숨겨진 <p> 요소를 슬라이드다운(표시):
$("button").click(function(){
$("p").slideDown();
});
정의 및 사용
SlideDown() 메서드는 선택한 요소를 슬라이드다운(표시)합니다.
참고: slideDown()은 jQuery 메서드로 숨겨진 요소와 CSS의 display:none에서 작동합니다(그러나 Visibility:hidden은 아님).
팁: 요소를 슬라이드업(숨기기)하려면 slideUp() 메서드를 살펴보세요.
통사론
$(selector).slideDown(speed,easing,callback)
Parameter | Description |
---|---|
speed | Optional. Specifies the speed of the slide effect. Default value is 400 milliseconds Possible values:
|
easing | Optional. Specifies the speed of the element in different points of the animation. Default value is "swing" Possible values:
|
callback | Optional. A function to be executed after the slideDown() method is completed
To learn more about callback, visit our jQuery Callback chapter |
직접 해보십시오 - 예
사용 속도 매개변수를 사용하여 슬라이드 효과의 속도를 지정하는 방법입니다.
사용 선택한 요소를 위아래로 슬라이딩할 때 콜백 매개변수를 사용하는 방법입니다.