I would need a jquery replacement function for a number with a string as well, but much finer though.

My php returns a number in this format eg 1.27

Depending on a range this number should be replaced by a certain string that matches a range:

Example:

The number 1.27 is in the "active" range of 1.0 and 1.5, so the replacement for this would be the string "active".
The value of 1.51 would be in the "less active" range from 1.5 to 2.0 and the replacement string would be the "less active" string.