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.'); });});