|
|
| |
jQuery ·Î ÅؽºÆ® ÀÔ·Â ¹Ú½º(TextArea)¿¡ Å©±â Á¶Àý ¸·´ë Ãß°¡Çϱâ. |
|
|
|
13³â Àü |
ÀÚ¹Ù½ºÅ©¸³Æ® ÇÁ·¹ÀÓ¿öÅ© jQuery ¸¦ È°¿ëÇؼ ÅؽºÆ® ÀÔ·Â ¹Ú½º (TextArea) ¿¡ Å©±â Á¶Àý ¸·´ë¸¦ Ãß°¡ÇØ º¾½Ã´Ù. ¾Æ·¡ ¼Ò°³ÇÑ ¼Ò½º¸¦ ½ÇÇàÇϸé ÀÔ·Â ¹Ú½º ÇÏ´Ü¿¡ ¸·´ë°¡ Ãß°¡ µÇ¸ç ÀÌ ¸·´ë¸¦ À§ ¾Æ·¡·Î µå·¡±× ÇÒ ¼ö ÀÖÀ¸¸ç µå·¡±× ¹æÇâ¿¡ µû¶ó ÅؽºÆ® ¹Ú½º Å©±â¸¦ ´Ã¸®°Å³ª ÁÙÀÏ ¼ö ÀÖ½À´Ï´Ù.
[Å©±â Á¶Àý ¸·´ë ¿¹Á¦ ÀÚ¹Ù½ºÅ©¸³Æ® ¼Ò½º ÄÚµå]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>TextArea Resize Demo</title>
<style type="text/css">
#in_content {width:511px; height:40px; border:1px solid #666666}
.resize_bar {background: url("images/resize_bar.gif"); cursor:s-resize; height:12px; width:100%;}
</style>
<script type="text/javascript" src="/js/jquery.js"></script>
<script type='text/javascript'>
<!--
jQuery.fn.resizehandle = function() {
return this.each(function() {
var me = jQuery(this);
me.after(
jQuery('<div class="resize_bar"></div>')
.bind('mousedown', function(e) {
var h = me.height();
var y = e.clientY;
var movehandler = function(e) {
me.height(Math.max(40, e.clientY + h - y));
};
var uphandler = function(e) {
jQuery('html').unbind('mousemove',movehandler)
.unbind('mouseup',uphandler);
};
jQuery('html') .bind('mousemove', movehandler)
.bind('mouseup', uphandler);
})
);
});
}
$(document).ready(function(){
$("textarea").resizehandle();
});
</script>
</head>
<body>
<table cellspacing=0 cellpadding=0 border=0><tr><td>
<textarea name="in_content" id="in_content">¾Æ·¡ Å©±âÁ¶Àý ¸·´ë¸¦ À̵¿Çغ¸¼¼¿ä.</textarea>
</td></tr></table>
</body>
</html>
[Å©±â Á¶Àý ¸·´ë ¿¹Á¦ ½ÇÇà °á°ú]
http://cfile4.uf.tistory.com/original/114E871C4A2B29936F19D9 |
|
̵̧ : 430 |
̵̧
¸ñ·Ï
|
|
| |
|