freqdec / fd-slider

An Unobtrusive Accessible Slider script that can also be used as an HTML5 Input Range polyfill solution
Other
264 stars 55 forks source link

Remove unnecessary assignment from `locate` loop #16 #39

Closed ghost closed 11 years ago

ghost commented 11 years ago

You were calling obj = obj.offsetParent twice each iteration, which means you skip one of the parents, and will throw an error if you are only one element from the document. This breaks "click to jump slider" when the slider is inside an absolutely positioned element.  This addresses issue 16.