공부하자
제이쿼리(J-Query) 메소드 slideUp, slideDown, slideToggle 본문
제이쿼리 slideUp, slideDown, slideToggle 메소드
: 슬라이드 애니메이션 효과를 구현해주는 메소드
문법
$("element").slideUp(time);
$("element").slideDown(time);
$("element").slideToggle(time);
1. $("element").slideUp(time);
: 선택한 요소가 서서히 올라가면서 사라지는 효과
ex.
$(".wrap .box").slideUp(2000); // 1000 = 1초
2. $("element").slideDown(time);
: 선택한 요소가 서서히 내려가면써 나타나는 효과
ex.
$(".wrap .box").slideDown(5000);
3. $("element").slideToggle(time);
: 선택한 요소의 표시 상태에 따라 다른 동작을 나타낸다.
ex. display:none 처리 되어있다면 slideDown 효과를 나타냄
ex.
$(".wrap .box").slideToggle(5000);
.slideUp() | jQuery API Documentation
Description: Hide the matched elements with a sliding motion. The .slideUp() method animates the height of the matched elements. This causes lower parts of the page to slide up, appearing to conceal the items. Once the height reaches 0 (or, if set, to what
api.jquery.com
'J-Query·JavaS' 카테고리의 다른 글
제이쿼리(J-Query) 메소드 animate() (0) | 2021.01.08 |
---|---|
제이쿼리(J-Query) 메소드 setInterval() (0) | 2021.01.08 |
제이쿼리(J-Query) 메소드 class() (0) | 2021.01.07 |
제이쿼리(J-Query) 메소드 CSS() (0) | 2021.01.07 |
제이쿼리(J-Query) 사용법과 선택자 (0) | 2021.01.07 |