jQuery 슬라이드업() 메서드

❮ jQuery 효과 메서드

예시

모든 <p> 요소를 슬라이드업(숨기기):

$("button").click(function(){
  $("p").slideUp();
});

정의 및 사용

SlideUp() 메서드는 선택한 요소를 위로 밀어 올립니다(숨깁니다).

참고 : 숨겨진 요소는 전혀 표시되지 않습니다(더 이상 페이지 레이아웃에 영향을 미치지 않음).

팁: 요소를 슬라이드다운(표시)하려면 slideDown() 메서드 를 살펴보세요 .


통사론

$(selector).slideUp(speed,easing,callback)

Parameter Description
speed Optional. Specifies the speed of the slide effect. Default value is 400 milliseconds

Possible values:

  • milliseconds
  • "slow"
  • "fast"
easing Optional. Specifies the speed of the element in different points of the animation. Default value is "swing"

Possible values:

  • "swing" - moves slower at the beginning/end, but faster in the middle
  • "linear" - moves in a constant speed
Tip: More easing functions are available in external plugins
callback Optional. A function to be executed after the slideUp() method is completed

To learn more about callback, visit our jQuery Callback chapter


직접 해보십시오 - 예


사용 속도 매개변수를 사용하여 슬라이드 효과의 속도를 지정하는 방법입니다.


사용 선택한 요소를 위아래로 슬라이딩할 때 콜백 매개변수를 사용하는 방법입니다.


❮ jQuery 효과 메서드