How to create animated sliding windows/tabs menu?

Posted by Forte on Stack Overflow See other posts from Stack Overflow or by Forte
Published on 2011-11-27T14:19:54Z Indexed on 2011/11/29 1:50 UTC
Read the original article Hit count: 113

I have created navigation menu in YUI 2.8 as below :

Sliding windows menu

I have also animated tabs using CSS transitions. CSS transitions are not widely supported by browsers and my animations are not working in Opera, IE etc.
Since i'm already using YUI 2.8 on that page, can somebody tell me how do i animate those tabs?
When i click on any tab, it should expand in vertical dimension smoothly (animated).
Below are the properties of tabs which are going to change when i select any tab (Below properties of tabs should be animated) :

  • Paddings
  • Margins
  • Background-Color
  • Borders

Please note in above image :

  • There is little space left on right side in case #1 when 1st tab is selected.
  • In case #2 and case #3 there is space left on left as well as right side.
  • In case #4, there is some space left on left side when last tab is selected.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about navigation