I’m trying to make a slider from scratch like the jQuery UI one but i’m not sure how to detect the horizontal position where the user clicks on the slider.
Example, if i click on foo div in the middle, it’d return 50%. If i have that it would be easy for me to adjust the slider’s filler div width accordingly.
Try this fiddle: http://jsfiddle.net/UCFtB/1/
Script: