A clean and relatively simple slider. If anyone can make the code simpler, please do! My mind is dead after solving this problem. X-)
Uses one flag, a counter and some positioning.
Also, I miss the windows slider's option to keep dragging even when you're outside the slider area. But what can you do.