アコーディオンとオートコンプリートプラグインを1つのソリューションにまとめようとしています。
いくつかの詳細を除いて、問題なく動作しています。オートコンプリートの要素がクリックされた後、アコーディオンを閉じる方法が見つかりません。
コードをいじるJS:http: //jsfiddle.net/yBKjd/1/
グラフィックの説明:
私が使用しているコードは次のとおりです。
$("#tags").autocomplete({
source: availableTags,
minLength: 0,
select: function(event, ui)
{
alert('I would like to close the accordion in this moment')
},
open: function()
{
$(this).autocomplete("widget")
.appendTo("#demo-description")
.css("position", "static");
}
}).on("focus", function ()
{
$(this).autocomplete("search", '');
});