What is up with this animate function?

What is up with this animate function?

I used this tut to make a horizontal accordion.. but are trying to extend it to hide and show content like this example..(click the black "knowledge" box and the sample will slide up)

but eventho the setup should be the same for expanding and opasity there is a opasity "blink" when hover over the expanded element but no collapsing. So the espanding/collapsing setup works, but not the Opasity part?

is it a var delaration issue?

  1. <script type="text/javascript" >
  2. $(document).ready(function(){
  3.     var lastBlock = $("#a1");
  4.     var kid = $("#a1").children(".kid");
  5.     var maxWidth = 210;
  6.     var minWidth = 60;

  7.     $("ul li a").hover(
  8.       function(){
  9.       
  10.         $(lastBlock).animate({width: minWidth+"px"}, { queue:false, duration:400 });
  11. $(this).animate({width: maxWidth+"px"}, { queue:false, duration:400});
  12. $(kid).animate({opacity: 0},100);
  13. $(this).children(".kid").animate({opacity: 1},500);
  14. kid = $(this).children(".kid")
  15. lastBlock = this;
  16.       }
  17.     );
  18. });
The HTML part


  1. <ul>
  2.   <li>
  3.     <a id="a1">
  4.       <div class="ARCCtitle">KNOWLEDGE</div>
  5.       <div class="kid">The foundation of our Design is knowledge. The more a strategy is qualified by knowledge of the subject, the greater are the creative freedom. </div>
  6.     </a>
  7.   </li>
  8.   <li>
  9.     <a>
  10.        <div class="ARCCtitle">RESEARCH</div>
  11.        <div class="kid">Our research is fundamental.
  12.          We need to know you to make functional design
  13.        </div>
  14.     </a>
  15.   </li>
  16.   <li>
  17.     <a>
  18.        <div class="ARCCtitle">WORKSHOPS</div>
  19.       <div class="kid">Engage users its going to be theres design
  20.       </div>
  21.     </a>
  22.   </li>
  23.     <li>
  24.     <a>
  25.             <div class="ARCCtitle">SURVEYS</div>
  26.       <div class="kid">We are building our surveys on the specific human environment and from our social knowledge
  27.       </div>
  28.     </a>
  29.   </li>
  30.   <img src="image/spids.png" alt="spids" width="60" height="220"/>
  31. </ul>
  32. </div>
And the CSS

  1. ul{
  2.   list-style: none;
  3.   margin: 0;
  4.   padding: 0;
  5. }

  6. li{
  7. cursor: pointer;
  8. }

  9. ul li{
  10. background-color: black;
  11. display:block;
  12. float:left;
  13. margin-left:10px;
  14. padding:10px;
  15. }

  16. ul li a{
  17.   display: block;
  18.   overflow: hidden;
  19.   height: 200px;
  20.   width: 60px;
  21. }

  22. #a1{
  23.   width: 210px;
  24. }

  25. .kid{
  26. font-size: 1.1em;
  27.   margin: 0;
  28.   padding-top: 5px;
  29.   display: block;
  30.   opacity: 0;
  31.   filter: alpha(opacity=0);
  32.   -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
  33. }

  34. #a1 .kid{
  35.   opacity: 1;
  36.   filter: alpha(opacity=100);
  37.   -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
  38. }

  39. ul li img{
  40.   position: absolute;
  41. }