JQuery Animationszahlzähler von Null bis WertJquery

JQuery-Programmierung
Anonymous
 JQuery Animationszahlzähler von Null bis Wert

Post by Anonymous »

Ich habe ein Skript erstellt, um eine Zahl von Null bis zu seinem Wert zu animieren. class = "snippet-code-js Lang-js hübschesPrint-override">

Code: Select all

$({ Counter: 0 }).animate({
Counter: $('.Single').text()
}, {
duration: 1000,
easing: 'swing',
step: function() {
$('.Single').text(Math.ceil(this.Counter));
}
});< /code>

150< /code>
< /div>
< /div>
< /p>



 funktioniert nicht < /h2>

Ich möchte jetzt das Skript mehrmals für jede Matching -Klasse mit dem Erfolg von jedem Matching -Class ausführen. weit: < /p>

 HTML < /strong> < /p>

200
55
< /code>

 JQuery < /strong> < /p>

$('.Count').each(function () {
jQuery({ Counter: 0 }).animate({ Counter: $(this).text() }, {
duration: 1000,
easing: 'swing',
step: function () {
$(this).text(Math.ceil(this.Counter));
}
});
});

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post