如何从手风琴中删除滚动条?

时间:2014-12-17 10:13:10

标签: javascript jquery jquery-ui-accordion

$( "#accordion" ).accordion({
            collapsible: true ,
            autoHeight: false,
            navigation: true,

            header: ".accordion-header"
        }).sortable({
            axis: "y",
            handle: ".accordion-header",
            stop: function( event, ui ) {
                // IE doesn't register the blur when sorting
                // so trigger focusout handlers to remove .ui-state-focus
                ui.item.children( ".accordion-header" ).triggerHandler( "focusout" );
            }
        });
}); 

我想从手风琴中删除滚动。它不起作用..

2 个答案:

答案 0 :(得分:1)

设置heightStyle:“content”允许手风琴面板保持原生高度

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

答案 1 :(得分:0)

尝试使用此功能:clearStyleheightStyle

$( "#accordion" ).accordion({
             heightStyle: "content",
             collapsible: true ,
             autoHeight: false,
             clearStyle: true,   
        });