views:

44

answers:

1

I have script:

http://jsfiddle.net/NV2uV/

It works, but I do not like.

Cons:

  1. Wrench (edge blocks).
  2. In the transition from one unit to another - animation is performed in two steps (I want a continuous animation).
  3. Script code is not beautiful, very much repetition.

In short - it looks not nice.

How to improve the script to look at the animation and it was good fo eyes (if you have ready-made solutions - please note me).


Update:

If you set the animation smaller - that animation looks quite nice.

Update 2:

I found solution: in animate function must add setting "queue:false", then animation will not be implemented not consistently but simultaneously.

http://jsfiddle.net/TtHBy/

But still I do not like a lot of repetitions in my script, how can it be cut and make it beautiful?

+1  A: 

Do you want a horizontal Accordion menu? You could look at this jQuery example: http://designreviver.com/tutorials/jquery-examples-horizontal-accordion/

And here is another example: http://www.dynamicdrive.com/dynamicindex17/haccordion.htm

And one more: http://tympanus.net/Tutorials/ElegantAccordion/

Peter Jaric
@snowlord, yes! great, i go to learn them.
Kalinin
Why not just take one of them or another Accordion?
Peter Jaric