Is it possible to create a rocking effect in jquery?To be honest I can't imagine how it could work but I am relatively new to jquery and it's always better to ask.
as you can imagine the square(in 3 stages) should move on the line.
Is this what you are looking for?
You need of course to include jQuery UI, or at least parts of it.
EDIT: After your elaboration, I think you are looking to animate the rotation, which can be done with CSS3. http://www.the-art-of-web.com/css/css-animation/
You can animate the position as well, if that helps you.