Hello.
I have two inputs where value can be 1 233 323 and 14 987 322 (prices in millions). The task of rounding and displaying only the bits of the millin 1 million and 14 million in this case.
I write this:
HTML:
<p> <label for="mse2_ms|price_0"> <span>От</span> <input id="mse2_ms|price_0" type="input" value="2673990" name="ms|price"> </label> <label for="mse2_ms|price_1"> <span>До</span> <input id="mse2_ms|price_1" type="input" value="3483545" name="ms|price"> </label> <span>Млн. руб.</span> </p> Jquery:
$('.mfilter-price').val($('.mfilter-price input').val().substring(0, 1)); In this case, with the given html in all input it is written 2.
I can not understand how for each unique value to change.
Thank you in advance.