How can you adjust the height of a jQuery UI accordion?

后端 未结 11 1914
礼貌的吻别
礼貌的吻别 2021-01-31 15:32

In my UI I have an accordion setup like this:

Section 1

...content...
//
11条回答
  •  天涯浪人
    2021-01-31 16:25

    From the docs it sounds like you'll need to set

    clearStyle: true
    

    ...and also

    autoHeight: false
    

    I believe that using clearStyle allows you to dynamically add content without Accordion getting in the way.

    So try this...

    $( ".selector" ).accordion({ clearStyle: true, autoHeight: false });
    

提交回复
热议问题