javascript - number animator - wordpress -


I am working on a WordPress site and would like to add a label that shows an animating number in the target number.

Here is an example (top of this page)

I have found some jQuery-based animators. If you can point out some more such animators, then choosing the best one will help, for my animation, the goal number is constant (it is not coming from any database or data source). I should be able to say the goal of 100 and start with 9 4 so that numbers 9 4 to 100 are alive.

Here is the one that I found

I created an element with two attributes Which looks like this:

  
div class = "number" target = "100" start = "94" & gt; & Lt; / Div & gt;

This should be the number you want to display.

In addition to this, Ive added this jQuery code:

  $ (function () {Var element = $ (".number"). First (); element Text (element.attr ("start") setTimeout (function () {step (element);}, randTime ());}); Function phase (element) {element.text (+ element.text () + 1); If (element.text ()! = Element.attr ("target") {setTimeout (function () {step (element);}, randTime ()); }}; Function Randetime () {Returned Mathematics Area (Math.Rendam) * 400); };  

Which should be very quiet.

Also see.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -