Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

125
Views
.change no funciona cuando estoy usando toLocaleString en keyup

necesito algo de ayuda.

Estoy usando keyup para formatear la moneda, pero cuando el valor llega a 1000 o más, el cambio no funciona. Si elimino toLocaleString(), .change funciona. ¿Cómo puedo hacer que ambas funciones funcionen? Gracias.

Para tu información, estoy usando laravel.

 $("#amount").change((event) => { updateAmountInfo($('#amount').val()) }) // End of Check Balance and Amount // $("#amount").on("keyup", function(event) { checkBalance(); var selection = window.getSelection().toString(); if ($.inArray(event.keyCode, [38, 40, 37, 39]) !== -1) { return; } var $this = $(this); var value = $this.val(); var input = value.replace(/[\D\s\._\-]+/g, ""); input = input ? Number(input) : 0; $this.val(function() { return (input === 0) ? "" : input.toLocaleString("en-US"); }); });
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!