javascript - JQuery animated banner -


So I had already asked a question how to create a banner shown and really good for me to start Get the answer off. I have been working since then and I have a lot of problems coming back to slide the animation back to the original position.
This is my animation: (Do not click on the green block first)
Problem: The first time you toggle a block, clicking on the second block does not make it left Will be taken. I also have some minor issues with whom I would be grateful if someone helped me.

  • How do I get the width and the speed of the blocks together in Batman? I am trying to repeat the animation?
  • How can I just slide back to the original position rather than just 'transport'?

    I'm just starting out on jQuery so that any help is amazing. Thank you.

    I think you have a reaction. If this version is of any help to you: Instead of changing the affected devices, I wrap them all in the # slider diwier and adjust them to the left edge pushing the left side.

      $ ('# Slider'). Chetan ({margin lift: '-' + 105 * 'PX'});   

    and back

      $ ('# slider'). Animate ({margin lift: 0 + 'px'});    

Comments