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

159
Views
Incrementar en más de un número con jQuery.animate

Tengo un script que anima desde cero hasta su valor. ¿Es posible incrementar este número en más de uno a la vez?

por ejemplo, 1, 5, 10, 15...... 100

 jQuery({ countNum: 0 }).animate({ countNum: jQuery('.ticker').text() }, { duration: 2000, easing: 'swing', step: function() { jQuery('.ticker').text((Math.floor(this.countNum))); }, complete: function() { jQuery('.ticker').text((Math.floor(this.countNum))); }, });
 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="ticker">100</div>

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puedes hacerlo así: HTML:

 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="ticker">100</div>

JS:

 jQuery({ countNum: 0 }).animate( { countNum: jQuery(".ticker").text()/5 }, { duration: 4000, easing: "linear", step: function () { jQuery(".ticker").text(Math.floor(this.countNum)*5); }, complete: function () { jQuery(".ticker").text(Math.floor(this.countNum)*5); } } );
about 4 years ago · Juan Pablo Isaza Report
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!