talhaturan.com

yazılım geliştirme ve dahası...

Buradaki örnek Textarea nesnesi içindir.

http://noteslog.com/personal/projects/wresize/1.1/jquery.wresize.js adresindeki wresize plug-in'ini, jQuery son versiyonu ile birlikte projeye ekliyoruz.

<script type="text/javascript" src="http://jquery.com/src/jquery-latest.pack.js"></script>
<script type="text/javascript" src="js/jquery.wresize.js"></script>
Hemen bu satırlardan sonra bir de resize fonksiyonu ekliyoruz:

<script type="text/javascript">

jQuery( function( $ ) {
function content_resize() {

var w = $( window );
var H = w.height();
var W = w.width();

$( '#content' ).css( {width: W-20, height: H-20} );

}

$( window ).wresize( content_resize );

content_resize();

} );

</script>
$( '#content' ), nesnenin ID'si burada.Sayfa içindeki DIV de şu:

<div id="content" style="border: 1px dashed silver; position:absolute; overflow:auto;">test</div> Kaynak: http://noteslog.com/post/how-to-fix-the-resize-event-in-ie/