Giter Club home page Giter Club logo

jquery-autogrow-textarea's Introduction

jquery-autogrow-textarea

A jQuery plugin to make textarea be resized automatically to fit its contents.

DEMO

http://jsfiddle.net/kuwabarahiroshi/7CsFR/

Why I wrote this plugin

Advanced plugin on this feature is found here:
http://www.technoreply.com/autogrow-textarea-plugin-version-2-0/

However, the plugin is not so good at multibyte character.
I, as a Japanese, thought it could be enhanced with using setInterval() and .scrollHeight to detect textarea height.

Misc

  • IE6-8 has a bug on .scrollHeight as described here:
    http://www.atalasoft.com/cs/blogs/davidcilley/files/IETextAreaBug.html
    This plugin copes well with this bug.

  • Padding height of a textarea is included in .scrollHeight on IE, Webkit, Opera, but excluded on FireFox.
    This plugin is perfectly cross-browser compatible.
    Compatibility is realized with feature detection not with browser detection.

Tested

  • Win XP: IE8
  • Win Vista: IE9, Opera, Firefox
  • Mac OSX: Chrome, Firefox, Safari
  • iOS: mobile safari

jquery-autogrow-textarea's People

Contributors

dinacel avatar kuwabarahiroshi avatar leonidaz avatar sandbox-app avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.