Text area width (minus scrollbar) using jQuery

Here fast.

Basically, I want the width of the textarea element - minus the width of the scroll bar, if present. I could just use the clientWidth DOM property, but I don't know if this is a cross browser. I'm sure jQuery has some method (.width () returns the width, including the scroll bar), but I can't figure out what it is.

Thank!

+5
source share
1 answer

clientWidth is cross-browser compatible, as reported by quirksmode.org (authority on this.) http://quirksmode.org/dom/w3c_cssom.html

+4
source

All Articles