0
I am trying to configure my inputs with monetary mask. I called the script as follows:
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="js/dist/jquery.mask.min.js">
$(document).ready(function(){
$('.money2').mask("#.##0,00", {reverse: true});
</script>
I created the following input:
<h4 id="cr1">Até 30 dias<input type="text" placeholder="R$ 0,00" id="cr11" name="ncr11" class="money2"/></h4>
I have also tried to replace $('.money2') with $('#cr11') in trying to call by id.
In both cases (class or id) did not work, as can be seen from the image below. I should call the mask in this field already, correct?
Which is the mask plugin you are using ? Jquery inputmask or other ? sends the link from where you downloaded it here in the comment
– AnthraxisBR
Check that scripts are being loaded normally. Press F12 and see that the browser does not show any errors. Taking advantage, I used your code in this fiddle and the same is working normally.
– Randrade
Hello Anthraxisbr, I downloaded the following link: https://github.com/igorescobar/jQuery-Mask-Plugin/archive/master.zip
– Bruce Duarte
Hello Randrade, this code appears on the console : Xmlhttprequest synchronous should not be used on the main thread due to its harmful effects on the user experience. For more information http://xhr.spec.whatwg.org/ (jquery-3.2.1.min. js:4:15845)
– Bruce Duarte
I can’t seem to solve friends...
– Bruce Duarte