Different classes for each number
voitin opened this issue · 0 comments
voitin commented
Hello,
Is it possible to add a different class to each number (0-9) so I can style each of them individually (add a background image for each of them)?
Update (if you need this feature)
Add after the following line in Odometer.prototype.animateSlide:
addClass(numEl, 'nr'+frame);
This one:
numEl.className = 'odometer-value';
And also add in Odometer.prototype.addDigit after:
digit.querySelector('.odometer-value').innerHTML = value;
This line:
digit.querySelector('.odometer-value').classList.add('nr'+value);
And all your digits will now have .nrX class added so you can style them how you want :)