0

I have 6 divs having the classname "count". I'm trying to replicate this: http://jsfiddle.net/4v2wK/

I'm simply trying to animate figures, but nothing works, here is my code:

$('.count').each(function(){
    $({someValue: 1000}).animate({someValue: this.value}, {
        duration: 6000,
        easing: 'swing', // can be anything
        step: function () { // called on every step
            // Update the element's text with rounded-up value:
            $(this).text(commaSeparateNumber(Math.round(this.someValue)));
        }
    });
});

Thanks a lot in advance for your help,

Isabelle,

Isabelle
  • 1,457
  • 5
  • 19
  • 44

1 Answers1

0

I was looking for the same kind of script and this one is working for me :

 $(document).ready(function(){

            $('.feature').each(function(){
                var el = $(this);
                $({someValue: 1}).animate({someValue: el.html()}, {
                    duration: 3000,
                    easing: 'swing',
                    step: function () {                     
                        el.html(Math.round(this.someValue));/**/
                    }
                });
            });

        });

Hope it helps ...