Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5968695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:07:35+00:00 2026-05-22T20:07:35+00:00

I wonder how to add new row/line to textarea while editing that is when

  • 0

I wonder how to add new row/line to textarea while editing that is when the number of letters exceeds number of cols of the textarea add new line automatically.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:07:36+00:00Added an answer on May 22, 2026 at 8:07 pm

    Some basic code to achieve this, tested in this jsfiddle (http://jsfiddle.net/NZbZn/). It will need work, obviously, but shows the basic concept.

    jQuery(document).ready(function(){
    
        //after typing occurs
        jQuery('textarea#expander').keyup(function(){
    
            //figure out how many chars
            var length = jQuery(this).val().length;
    
            //if more than 10
            if(length > 10){
    
                //if the modulus 10 of the length is zero, there are a multiple of 10 chars, so we need to extend by a row
                //(NOTE the obvious problem - this will expand while deleting chars too!)
                if((length % 10) == 0){
    
                    //figure out the number of rows, increment by one, and reset rows attrib
                    var rows = jQuery(this).attr('rows');
                    rows++;
    
                    jQuery(this).attr('rows', rows);    
                }  
            }   
        });    
    });
    

    Again though, consider the UI implications first.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

new to vba, and wonder how to address elements within a range. I add
When answering another question I started to wonder how I could Add new properties
I just wonder how to add annotation in matlab plot? Here is my code:
I wonder if someone can help me. I'm trying to add a reference to
I recently started to add the new noexcept specification to move constructors/assignments wherever possible.
I am new to mvc and I wonder how I can change the background
I need to add some new functionality to an existing interface. There are already
I'm using the tabs control in jquery ui. I add new tabs dynamically based
I wonder what's the most effective way to render ANYTHING that might come from
I'm working in a Delphi IDE expert and I wonder if it's possible add

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.