0
I need a percentage mask with the library jQuery Mask Plugin v1.5.4
.
What I am trying to do is that the user can report a value from -99.99 to 99.99.
I’m trying like this:
$("#edtPercentual").mask("99,99%");
$("#edtPercentual").on("blur", function() {
var value = $(this).val().length == 1 ? $(this).val() + '%' : $(this).val();
$(this).val( value );
});
As you can see, it’s not about much. How do I manage to put negative and also how do I show the "%" in any situation, the code above does not show the percentage when the value has two (2) decimal places.
Editing should be a new response.
– Oralista de Sistemas