javascript - wNumb change specific value (add postfix to specific value)? -
i trying make slider 0-2000, 2000 displays "2000+", encapsulating >=2000.
my encoder looks this:
encoder: function(a) {     == 2000 ? = + '+' : null;     return a; }   however, returns false when a=2000. take because a needs integer, not string. how can conditionally add postfix, then?
just came across issue , solved using wnumb's edit option.
 not perfect because checks after formatting job.
format: wnumb({     prefix: '$',     decimals: 0,     thousand: ',',     edit: function( value ) {         return (value == '$2,000') ? '$2,000+' : value;     } })      
Comments
Post a Comment