2016-03-01 66 views
0

我的代碼如下。它只適用於一個屬性:標題更改Jquery UI的屬性手風琴腳本

但是,我還想將heightStyle屬性從「auto」更改爲「content」。

...但是,當我嘗試添加heightStyle屬性整個事情似乎分解。

這裏是原來的,其工作原理:

/* Accordion effect with just one attribute customized*/ 
    $(function() { 
    $("#accordion").accordion({ 
     header:"h6" 
    }); 
    }); 

當我嘗試添加heightStyle屬性,像下面,沒有什麼工作。我完全失去了手風琴的效果。我究竟做錯了什麼?

/* Accordion effect with two custom attributes */ 
    $(function() { 
    $("#accordion").accordion({ 
     header:"h6" 
     heightStyle:"content" 
    }); 
    }); 

回答

0

使用「,」分隔選項。

/* Accordion effect with two custom attributes */ 
    $(function() { 
    $("#accordion").accordion({ 
     header:"h6", 
     heightStyle:"content" 
    }); 
    }); 
+0

漂亮!謝謝! :^) –