I'm using the jquery mask plugin in the input value. The formatting I am using is the following '0,000'. I would like to know how to change the formatting to '0.000' when I select KG in 'select'.
$('.valor').mask('00.000.000,00', {
reverse: true
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.3/jquery.mask.js"></script>
<input type='text' class='valor' name='valor'>
<select name='categoria' class='select form_campos'>
<option value='1'>R$</option>
<option value='2'>KG</option>
</select>