htmltextareaonresize

textarea onresize not working


according to w3 schools <textarea> supports onresize however it is not working.

http://www.w3schools.com/jsref/event_onresize.asp

browsers tried:

Chrome 25.0.1364.172

Safari 6.0.3 (7536.28.10)

Firefox 19.0

FIDDLE: http://jsfiddle.net/btevfik/5abR3/

update

as i learned my lesson not to trust w3schools 100%, i found this

https://developer.mozilla.org/en-US/docs/DOM/element.onresize


Solution

  • Textareas don't resize in MOST(ALL) the browsers onresize event is NOT WORKING FOR the window object in this case, you case use jQuery UI plugin:

    $("idoftextarea").resizable({
        resize: function() {
            $("id").append("yourcode");
        }
    });
    

    Reference: http://jqueryui.com/resizable/