I’m animating a div to left by 0px by clicking on the div colored in red. Below the div , classes are added to li’s as the div moves along, but the classes gets added to only certain li’s and not all.
Is there any other logic to fix this ?
Fiddle – http://jsfiddle.net/AsfFQ/16/
Below is the image of the issue

Try this jsFiddle example.
This sets the eligible list items and then as the bar moves, compares their position to tjat of the bar and if they’re in range, they get the class added.