srexi / purecounterjs

A simple yet configurable native javascript counter which you can count on.
MIT License
122 stars 48 forks source link

Add data attribute to prepend or append custom text or symbol #37

Open chrish123 opened 1 year ago

chrish123 commented 1 year ago

Similar to the currency attribute where it gets displayed as "13,000 K", can you please add a couple of custom data attributes, such as purecounter-custom-before and purecounter-custom-after to the source code?

So, the span/div etc will be displayed as "+ 1200" or "1200 +" depending on prepend or append.

Thanks in advance!

mnsrknp commented 6 months ago

This can be achieved easily with ::after or ::before pseudo elements.