开发者

jquery accordion height

开发者 https://www.devze.com 2023-03-13 14:15 出处:网络
I have two accordion. Accordion 1 : Router Info(con开发者_运维百科tains gridRouter) Accordion 2 : UNC Info(contains

I have two accordion.

Accordion 1 : Router Info(con开发者_运维百科tains gridRouter)

Accordion 2 : UNC Info(contains gridUNC)

If the gridRouter contains 2 records and gridUNC contains 30 records, the accordion 1 takes space for 30 records (not for 2 records)


As of jQuery UI 1.10 the 'autoHeight' attribute has been deprecated. To achieve the same effect in the new version use heightStyle: "content"

See an example: http://jqueryui.com/accordion/#no-auto-height


you should use

$("#accordion").accordion({ 

heightStyle: "content" 

});

It will set height according to your content. and will not use blank space as height.


Try setting the autoHeight property to false. See http://jqueryui.com/demos/accordion/#options.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号