$(window).scroll(function(){ var number = 0; /* I'd like to increment this by one on scroll */ // Only start the process when the first section comes into view if($("#progress-tracker-nav li").hasClass('active-section')) { number++; /* I'd like to increment this by one on scroll */ $(".progress-line").css('height', number + '%'); } })

bild_01