jQuery hide() 메서드
예시
모든 <p> 요소 숨기기:
$("button").click(function(){
$("p").hide();
});
정의 및 사용
hide() 메서드는 선택한 요소를 숨깁니다.
팁: 이것은 CSS 속성 display:none과 유사합니다.
참고 : 숨겨진 요소는 전혀 표시되지 않습니다(더 이상 페이지 레이아웃에 영향을 미치지 않음).
팁: 숨겨진 요소를 표시하려면 show() 메서드를 살펴보십시오.
통사론
$(selector).hide(speed,easing,callback)
Parameter | Description |
---|---|
speed | Optional. Specifies the speed of the hide 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 hide() method is completed
To learn more about callback, visit our jQuery Callback chapter |
직접 해보십시오 - 예
사용 요소를 숨기거나 표시할 때 속도 매개변수를 사용하는 방법입니다.
사용 요소를 숨기거나 표시할 때 콜백 매개변수를 사용하는 방법입니다.