I wanted to animate a block of div and also at the same time add class to li, How can i do this?
My fiddle – http://jsfiddle.net/AsfFQ/4/
When i click the div in ‘red’ background, it will animate 0px to left. How add a class “selected” to li’s for every 20px of animation of the div.
Have a look at this DEMO.
Here’s the Javascript: