2

I have a textbox which accepts numeric values, i want the cursor to be moved on the right end side when user focus on the textbox or types anything in it.

HTML Markup

<input type="text" class="numericBox" tabindex="0" value="0.00">

CSS

.numericBox{
 text-align:right;
}

Fiddle Demo

I have tried direction:rtl property of CSS, but i think it's not for the same. Any suggestion with jQuery or pure CSS/CSS3 will be apreciated.

Thank You.

Dhaval Marthak
  • 17,246
  • 6
  • 46
  • 68
  • possible duplicate of [Use JavaScript to place cursor at end of text in text input element](http://stackoverflow.com/questions/511088/use-javascript-to-place-cursor-at-end-of-text-in-text-input-element) – matewka Oct 09 '13 at 10:00

1 Answers1

0

You have to specify dir attribute is rtl

 <input type="text" name="user" dir="rtl" />
srihari
  • 917
  • 4
  • 14
  • 26