loopj/jquery-simple-slider — pull request #17 by mkoistinen (2013-03-08 17:16:00+00:00)
Title: Precision for output and integral tooltips for display

Firstly, I'm surprised this slider isn't more popular. I needed a cross-platform-capable slider for my project and looked all over. It seems my choices were: JQuery-UI (which I think is a bit heavy for a simple slider), an HTML polyfill (there are ZERO that actually work across all platforms that I could find, besides, not all projects use HTML5) or roll my own. This project is simple enough that it provided 90% of what I needed, thank you!

I see there are some pending touch-support commits, I would love to see these merged soon.

Anyway, these commits work together. First is just a removal of trailing whitespace (a pet-peeve of mine). Second is the addition of precision control for output values IF a step is defined. So, if your step is 0.01, the output will be fixed to 2 decimal places. It seems silly that this would be required, but thanks to the fuzziness of floating point numbers, it is. If no step is defined, the output is as it was: not fixed.

Finally, I've added support for an integral tooltip-style display of the output (which is one reason why the output precision was required).