jQuery 효과 fadeOut() 메서드
예시
모든 <p> 요소를 페이드 아웃합니다.
$("button").click(function(){
$("p").fadeOut();
});
정의 및 사용
fadeOut() 메서드는 선택한 요소의 불투명도를 표시에서 숨김(페이딩 효과)으로 점진적으로 변경합니다.
참고 : 숨겨진 요소는 전혀 표시되지 않습니다(더 이상 페이지 레이아웃에 영향을 미치지 않음).
팁: 이 메서드는 종종 fadeIn() 메서드 와 함께 사용됩니다 .
통사론
$(selector).fadeOut(speed,easing,callback)
Parameter | Description |
---|---|
speed | Optional. Specifies the speed of the fading 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 fadeOut() method is completed
To learn more about callback, visit our jQuery Callback chapter |
직접 해보십시오 - 예
사용 속도 매개변수를 사용하여 페이딩 효과의 속도를 지정하는 방법입니다.
사용 선택한 요소의 불투명도를 점진적으로 변경할 때 콜백 매개변수를 사용하는 방법입니다.