Home > Enterprise >  Set up direction from right to left jQuery
Set up direction from right to left jQuery

Time:11-20

I have such a problem because I need to set the numbers in the html input to write from right to left. And I set it up with jQ('[id="applying_credit"]').css('direction','rtl'); and it's working but when i try put some negative number like e.g "-2" its gives me "2-" . The minus sign goes to the end and I'd like it to go before 2 . Is there any chance to do it ?

https://jsfiddle.net/Palucci92/h2rn3b06/ `


              <div >
                        <input type="text" name="applying_credit" id="applying_credit"  />
                    </div>

CodePudding user response:

try to use text-align instead of direction

jQ('[id="applying_credit"]').css('text-align','right');
  • Related