MediaWiki: Common.js: Unterschied zwischen den Versionen
Aus Joachim Camerarius (1500-1574)
Noeth (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
Noeth (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
Zeile 1: | Zeile 1: | ||
/* Das folgende JavaScript wird für alle Benutzer geladen. */ | /* Das folgende JavaScript wird für alle Benutzer geladen. */ | ||
// number count for stats, using jQuery animate | |||
$('.counting').each(function() { | |||
var $this = $(this), | |||
countTo = $this.attr('data-count'); | |||
$({ countNum: $this.text()}).animate({ | |||
countNum: countTo | |||
}, | |||
{ | |||
duration: 3000, | |||
easing:'linear', | |||
step: function() { | |||
$this.text(Math.floor(this.countNum)); | |||
}, | |||
complete: function() { | |||
$this.text(this.countNum); | |||
//alert('finished'); | |||
} | |||
}); | |||
}); |
Version vom 25. Oktober 2018, 21:41 Uhr
/* Das folgende JavaScript wird für alle Benutzer geladen. */ // number count for stats, using jQuery animate $('.counting').each(function() { var $this = $(this), countTo = $this.attr('data-count'); $({ countNum: $this.text()}).animate({ countNum: countTo }, { duration: 3000, easing:'linear', step: function() { $this.text(Math.floor(this.countNum)); }, complete: function() { $this.text(this.countNum); //alert('finished'); } }); });