jQuery or Javascript continuous counter (countup) -


There is a search for a script that I can ideally enter an initial number and a start date, which Once again, I set the example at 1%

This means that it is showing a live count.

Ideally, this script ideally counts that the number should be based on the difference between the current time and the start time.

Can anyone get links or plugins or solutions they can share?

If numbers of numbers can also be altered better, but appreciate a starting point very much.

Thank you

If you want only Javascript solution, Can create a div:

  & lt; Div id = "counter" & gt; & Lt; / Div & gt;  

and then use the following script anywhere on the page:

  var START_DATE = new date ("27 July 2010 13:30:00") ; // put in the starting date here var INTERVAL = 1; INCREMENT = 2 in SECOND SEC; // maximum per START_VALUE = 9001; // The starting value when this start date is var number = 0; Window.onload = function () {var msInterval = INTERVAL * 1000; Var now = new date (); Count = parseInt ((now - START_DATE) / msInterval) * INCREMENT + START_VALUE; Document.getElementById ('counter'). InnerHTML = count; SetInterval ("count + = INCREMENT; document.getElementById ('counter'). InnerHTML = count;", msInterval); }  

You can use the same technique to get the images, or you can simply style the counter dividend with the CSS.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -