title: Automatic Textarea cursor movement
body: <p>My question is almost similar to <a href="https://stackoverflow.com/questions/3115282/automatic-newline-in-textarea">Automatic newline in textarea</a> in textarea but my context is more complex. I have multiple textareas which have a 1 row attribute thus giving an impression of writing on air(just meaning empty area on the website with no borders since the textarea border i have set in css as<b> >>> border: 0;)</b>.</p>
  
  <p>I would like to use JQuery or Javascript to calculate when the text entered by the user if he/she has reached the end of the row of the textarea so as to automatically move to the next textarea below. One way to solve this would be to try and count the characters but different characters have different widths. </p>
  
  <p>I'm thinking of inserting a hidden element at the edge of the textareas to act as a trigger for the <b> nexttextarea.focus() event</b> but i have no idea of how i can achieve this. </p>
  
  <p>I have tried goofing around and thinking of different hacks but only one seems to be the solution... Try to store each character in an array and give them their default space taking value in px...like <b>'a'=>0.7px,'b'=>0.9px </b> or something of the sort if their is a list somewhere (although it looks like it would take a lot of overhead in terms of memory as i would have to store both capital, small letters and many other characters.) Then do some calculations depending on the width of the browser if it has been re-sized or if not the full size to determine when the textarea row width becomes full at the browser width edge. (For the time being the textarea width is 100% and has no parent therefore fills the whole browser width). </p>
  
  <p>If anybody has an idea of a complex or simple way i can accomplish this, help me. A big problem is that IE and Mozilla introduce scroll-bars if the browser window is re-sized, and scroll-bars is what i <b>never</b> want the user to see(remember impression of typing into thin air).</p>
  
  <p>Forgive me for being so verbose..just wanted to be accurate and detailed.</p>