I'm trying to mix the accordion and the autocomplete plugins into one single solution.
It is working ok, exept for a few detail. I can't find how to close the accordion after an element of the autocomplete is clicked.
JS fiddle with the code: http://jsfiddle.net/yBKjd/1/
Graphic explanation:
The code I'm using is the following:
$("#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", '');
});