티스토리 뷰

jQuery

.show() .hide()

IT 2010. 12. 28. 11:08
매칭되는 elements 들을 보이게 하거나 사라지게 할 때 사용한다.

사용문법
.show()
.show( duration, [ callback ] ) 
.show( [ duration ], [ easing ], [ callback ] )
 ※ duration 은 1/1000 초 단위값이다. fast 또는 slow 문자를 가질 수 있다.

사용예
<div id="clickme">  Click here</div><img id="book" src="book.png" alt="" width="100" height="123" />With the element initially hidden, we can show it slowly:$('#clickme').click(function() {  $('#book').show('slow', function() {    // Animation complete.  });});

사용문법
 .hide()
 .hide( duration, [ callback ] )
 .hide( [ duration ], [ easing ], [ callback ] )
 ※ duration 은 1/1000 초 단위값이다. fast 또는 slow 문자를 가질 수 있다.

사용예
<div id="clickme">  Click here</div><img id="book" src="book.png" alt="" width="100" height="123" />With the element initially shown, we can hide it slowly:$('#clickme').click(function() {  $('#book').hide('slow', function() {    alert('Animation complete.');  });});

'jQuery' 카테고리의 다른 글

.addClass() .removeClass()  (0) 2010.12.28
.fadeIn() .fadeOut()  (0) 2010.12.28
.trigger()  (0) 2010.12.27
.bind()  (0) 2010.12.27
event.pageX + event.pageY  (0) 2010.12.27
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30