ȸ¿ø°¡ÀԡžÆÀ̵ð/ºñ¹øã±â
ȨÀ¸·Î


[jQuery] jQuery fadeIn(), fadeOut(), fadeToggle(), fadeTo() ÀÌÇØÇϱâ
9³â Àü
fadeÀÇ »çÀüÀûÀÎ Àǹ̴ "õõÈ÷ »ç¶óÁö´Ù" , "Á¡Á¡ Èñ¹ÌÇØÁö´Ù" ¶ó´Â ¶æÀÔ´Ï´Ù.

<!DOCTYPE html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
</script>
<script>
$(document).ready(function(){
        $("#b1").click(function(){
                // õõÈ÷ È­¸é¿¡ ³ªÅ¸³ª°Ô ÇÏ´Â ÇÔ¼ö ÀÔ´Ï´Ù.
                $("#div1").fadeIn();
                $("#div2").fadeIn("slow");
                $("#div3").fadeIn(3000);
        });
        
        $("#b2").click(function(){
                // õõÈ÷ È­¸é¿¡¼­ »ç¶óÁö°Ô ÇÏ´Â ÇÔ¼ö ÀÔ´Ï´Ù.
                $("#div1").fadeOut();
                $("#div2").fadeOut("slow");
                $("#div3").fadeOut(3000);
        });
        
        $("#b3").click(function(){
                // Toggle()Àº (hide,show), (in,out) ÀÇ ±â´ÉÀ» µ¿½ÃÇØ ¼öÇàÇÏ´Â ÇÔ¼ö ÀÔ´Ï´Ù.
                // ±×·¡¼­ fadeToggle()Àº õõÈ÷ »ç¶óÁö°í ³ªÅ¸³ª´Â Çö»óÀ» ¹Ýº¹ÀûÀ¸·Î ¼öÇàÇÕ´Ï´Ù.
                $("#div1").fadeToggle();
                $("#div2").fadeToggle("slow");
                $("#div3").fadeToggle(3000);
        });
        
        $("#b4").click(function(){
        // fadeTo() ÇÔ¼ö´Â Åõ¸íµµ¸¦ Á¶ÀýÇÏ¿© ¿òÁ÷ÀÓÀ» ¸¸µé¾î ³»´Â ÇÔ¼öÀÔ´Ï´Ù.
        // ±×¸®°í fadeTo() ÇÔ¼ö´Â ´Ù¸¥ ÇÔ¼ö¿Í ´Ù¸£°Ô ¹Ýµå½Ã Åõ¸íµµ¸¦ ¸í½ÃÇØ ÁÖ¾î¾ß ÇÕ´Ï´Ù.
        // Åõ¸íµµ´Â 0¿¡¼­ 1»çÀÌÀÇ °ªÀ¸·Î Åõ¸íµµ¸¦ ³ªÅ¸³À´Ï´Ù.  0ÀÌ¸é ¿ÏÀü ¾Èº¸ÀÌ°í 1ÀÌ¸é ¿ÏÀüÈ÷ º¸ÀÔ´Ï´Ù.
        // 0.5¶ó¸é ¹Ý¸¸ Åõ¸íµµ°¡ Àû¿ëµË´Ï´Ù.
                $("#div1").fadeTo("slow",0.1);
                $("#div2").fadeTo("slow",0.5);
                $("#div3").fadeTo("slow",0.9);
        });
});
</script>
</head>
<body>
<p>fadeIn Çö»óÀ» È®ÀÎÇغ¸¼¼¿ä!</p>
<button id="b1">fadeIn ¹öÆ°À» Ŭ¸¯Çϼ¼¿ä</button>
<button id="b2">fadeOut ¹öÆ°À» Ŭ¸¯Çϼ¼¿ä</button>
<button id="b3">fadeToggle ¹öÆ°À» Ŭ¸¯Çϼ¼¿ä</button>
<button id="b4">fadeTo ¹öÆ°À» Ŭ¸¯Çϼ¼¿ä</button>
<br><br>
<div id="div1" style="width:80px;height:80px;display:none;background-color:red;"></div><br>
<div id="div2" style="width:80px;height:80px;display:none;background-color:green;"></div><br>
<div id="div3" style="width:80px;height:80px;display:none;background-color:blue;"></div>
</body>
</html>
ÃßõÃßõ : 432 Ãßõ ¸ñ·Ï
¹øÈ£ Á¦¸ñ
2,615
Ŭ¸¯½Ã url º¹»çÇϱâ
2,614
CSS Hover ¸¦ ÀÌ¿ëÇÑ ±ò²ûÇÑ ÆäÀÌ¡
2,613
½ºÅ©·ÑÇصµ »ó´Ü¿¡ °íÁ¤µÇ´Â ¸Þ´º ¸¸µé±â
2,612
[Á¤±ÔÇ¥Çö½Ä] php ¹®ÀÚ¿­¿¡¼­ ¼ýÀÚ¸¸ ÃßÃâ
2,611
HTML5 Video/Audio CurrentTime/Ended ¹®Á¦Á¡
2,610
audio ¿¤¸®¸ÕÆ®ÀÇ onplay À̺¥Æ® ó¸® ½Ã ÁÖÀÇ»çÇ×
2,609
PHP - $ SERVER ȯ°æº¯¼ö
2,608
Example #1 print ¿¹Á¦
2,607
php `/`±âÁØÀ¸·Î ÀÚ¸£±â
2,606
php ¹®ÀÚ¿­ ÇÔ¼ö
2,605
ÁÖ¼Òµî ÀÎÄÚµùÇؼ­ º¸³»±â
2,604
jquery load() ¸Þ¼Òµå (ºñµ¿±â À¥ÆäÀÌÁö ·Îµå)
2,603
[Ajax] ajax ¿¹Á¦2
2,602
[Ajax] ajax ¿¹Á¦1
2,601
[Ajax] JSON (Javascript Object Notation) »ç¿ëÇϱâ
2,600
[jQuery] jQuery.ajax() HTTP ºñµ¿±â µ¥ÀÌÅÍ ±³È¯
[jQuery] jQuery fadeIn(), fadeOut(), fadeToggle(), fadeTo() ÀÌÇØÇϱâ
2,598
IE6~7 ¹®Á¦ÇØ°á
2,597
Windows Media Player Á¦¾î
2,596
³ª´®°íµñ ±¸±Û À¥ÆùÆ®(Webfont) »ç¿ëÇϱâ
2,595
PHP ¹®ÀÚ¿­ ³ª´©±â - explode()
2,594
[PHP] ceil() , floor(), round() ÇÔ¼ö
2,593
PHP split ÇÔ¼ö¸¦ ÀÌ¿ëÇÑ ¹®ÀÚ¿­ ºÐ¸®
2,592
[CSS] :before,:after È°¿ëÇϱâ - ±¸ºÐ¼±
2,591
CSS border-image ¼Ó¼º
2,590
jquery ±âº»¹®¹ý
2,589
[ÀÚ¹Ù½ºÅ©¸³Æ®] ¼­¼­È÷ ³ªÅ¸³ª°í »ç¶óÁö´Â â
2,588
php¿¡¼­ À̹ÌÁö ÆÄÀÏÀ» ·£´ýÇÏ°Ô ºÒ·¯¿À±â
2,587
php¿¡¼­ sendmail Å×½ºÆ® Çϱâ
2,586
phpÀÇ number format ÇÔ¼ö - ¼ýÀÚ¸¦ õ´ÜÀ§·Î ±¸ºÐ
¸ñ·Ï
¹ÂÁ÷Æ®·ÎÆ® ºÎ»ê±¤¿ª½Ã ºÎ»êÁø±¸ °¡¾ßµ¿ ¤Ó °³ÀÎÁ¤º¸Ãë±Þ¹æħ
Copyright ¨Ï musictrot All rights reserved.