Solved

Automatic Expansion of a text box

Posted on 2013-11-10
1
203 Views
Last Modified: 2013-11-14
I am trying to have a text box automatically expand height wise as a person continues to type using JQuery or Jacascript.  How do I do that?  Thanks!
0
Comment
Question by:VBBRett
1 Comment
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39637567
http://jsfiddle.net/yJ8CT/
$('#mytextarea').keypress(function(e){
    $(this).height(this.scrollHeight)
});

Open in new window

If you want something a bit more fancier
http://www.jacklmoore.com/autosize/
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now