How to find whether text in a text area is wrapped to multiple lines?
How can I find whether a long text in a textarea is wrapped into two or more lines? I'm not talking about the new line chars as discussed here . I'm aware of the plugin Textarea Line Count Any simpler method? I experimented on this and came up with a hack that involves the following: Disabling text-wrapping in the textarea (plus disable padding) Checking if the textarea's scrollWidth is greater than it's width . The basic logic i used was that if the text is spanning multiple lines, that means when wrapping is turned off, we should get a horizontal scrollbar. Demo : http://jsfiddle.net/fnG3d/