Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Increment counter formatting

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #41100
    i3a1l3y
    Member

    Basically the counter I have created for a website seems to be working as I want it to (I can edit it to do what I want) – but for some reason when I increment it by decimals i.e. 0.1, 0.2, 0.3 etc the formatting glitches?

    You can view the counter live at http://lowco2.eu

    Here is the code behind the counter:

    Script:

    >

    Any help is much appreciated!

    #116369
    i3a1l3y
    Member

    Can anyone help with this at all?

    Cheers

    #116370
    Paulie_D
    Member

    I’m not seeing a counter on the link you provided.

    EDIT: Wow that’s hard to see.

    #116371
    Watson90
    Member

    I don’t see the point behind having it on your website anyway as it’s not really a true reflection on the amount you’re exactly saving to be honest…

    But i just ran your code through [JSLint](http://www.jslint.com/ “”) on the JSFiddle website and it threw back a few errors.

    Try changing this;

    var number = ;

    To this;

    var number = (int)((time()-1262325600)/150);

    This is what I got – Here

    #116556
    i3a1l3y
    Member

    > I’m not seeing a counter on the link you provided.

    EDIT: Wow that’s hard to see.

    It isn’t live hence it being hard to see, but thanks for your lack of help!

    Thanks Watson… I will give it a try and see if it begins to sort it out.

    It is possible to work out an estimate by taking the average tonnes of co2 they save over the last 3 years. I only design what they want though, so I won’t defend the need of it!

    Cheers

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.