How can I get jquery to execute animations in exact parallel?

前端 未结 7 1936
梦谈多话
梦谈多话 2020-12-09 00:30

I\'m trying to create an accordion widget in jquery similar to jquery\'s accordion plugin, with the difference that I want the handles to appear below their respective conte

7条回答
  •  無奈伤痛
    2020-12-09 00:39

    This does not solve running animations in parallel however it reproduces your expected behavior without the jitter. I placed section inside of handle to reduce the number of animations. You could use andSelf() to make the code smaller but it would be harder to read. You will need to make some style tweaks.

    
    
        Accordion Test
        
        
        
    
    
    
    
    This is section 1
    handle 1
    This is section 2
    handle 2
    This is section 3
    handle 3
    This is section 4
    handle 4
    This is section 5
    handle 5

提交回复
热议问题