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

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

In my UI I have an accordion setup like this:

Section 1

...content...
//
11条回答
  •  -上瘾入骨i
    2021-01-31 16:02

    Use heightStyle option to control the height of the accordion and each panel.

    $("#accordion").accordion({
      heightStyle: "content"
    });
    

    Possible values:

    1. "auto": All panels will be set to the height of the tallest panel.
    2. "fill": Expand to the available height based on the accordion's parent height.
    3. "content": Each panel will be only as tall as its content.

提交回复
热议问题