2012-08-16 46 views

回答

-1

您可以使用不同的選擇器分別定位它們,並使用不同的minLength運行.combobox()

例如,如果您有以下HTML:

<select id="first"> 
    <!-- options... --> 
</select> 

<select id="second"> 
    <!-- options... --> 
</select> 

你可以這樣做:

$('#first').combobox(); /* first combo box, default minLength */ 
$('#second').combobox({ minLength: 4 }); /* second , different minLength */ 

您還可以更改的選項combobox()被稱爲後。例如:

$('select').combobox(); /* convert all select menus to combobox */ 
$('#second').combobox("option", "minLength", 0); /* diff minLength for #second */ 
+0

Select使我所有的選擇都進入組合框。很好,從來不知道我能做到這一點,但不幸的是我仍然無法改變最小長度。這是我的代碼'$(函數(){ \t \t $( '選擇')組合框(); \t \t $( '#曲目')組合框( 「選項」, 「的minLength」,0); \t \t});''我試過自動完成和這是jqueryui文檔有什麼,它只是不會從默認更改。插件代碼與jquery網站上的演示完全相同 – Mark 2012-08-17 15:46:06

相關問題