I am trying to animate a say $233 to $250 or decreasing from 250 to 233 ,i dont want to replace 233 by 250 instead i want a counter kind of effect and at the time of scrolling
Untested - but should work along these lines
create the HTML like this:
earn $233 without working hard
and jQuery like this:
function increment(){ $('#counter').text(parseFloat($('#counter').text())+1) if(parseFloat($('#counter').text()) < 250){ setTimeout(increment,100) } } increment()