简体   繁体   中英

jquery ui accordion not autoheighting

I am trying to get this to autoheight as I've got some accordion panels with more content that others but it's leaving a lot off white space, can anyone help? I've tried using the fillspace option, but it leaves a scrollbar on each panel, I've tried the clearstyle option but it jumps up.

$(function () {
        var cookieName = 'stickyAccordion';
        $('#accordion').accordion({
            autoHeight: (true),
            collapsible: (true),
            active: ($.cookies.get(cookieName) || 0),
            change: function (e, ui) {

                $.cookies.set(cookieName, $(this).find('h3').index(ui.newHeader[0]));
            }
        });
    });

heightStyle: "content" should solve your problem but I found that setting autoHeight: false solved it for me. I've been tearing my remaining hair out for an hour over this (though I realise you've probably solved this by now).

I found that:

autoHeight: false

Solved my problem. Give it a shot.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM