autocomplete select to accordion active?
Hi all,
I'm trying to use the autocomplete selection to activate an accordion element, but it seems I need some advice. Here is my code:
- jQuery("input#autocomplete").autocomplete({
source: ["TDECK", "HkDict", "NFO", "0V", "PP", "IDI", "CSRV", "CSR", "I", "I12", "I18", "I2B", "I2BP", "I2P", "I2PP", "I2HSP", "I2SKIM", "I2SKIMV", "I2SKIMP", "LSL", "IWF", "DWF", "HA", "DWIN", "DDOOR", "A2Z", "NIG", "IGSB", "IGSBP", "GSCLRNC", "DG", "IG", "LGS", "I34", "I38", "I3B", "I3G", "I3GT", "I4G", "I48GR", "I7SPA", "I8SPA", "IMUD", "IA", "IAC", "IACAN", "IACL", "IAD", "IAIR", "IAPPROV", "IARO", "IAP", "IAT", "IB", "IBC", "IBL", "IBOB", "IBR", "IBRP", "IBPRS", "IBUB", "IAS", "ISBS", "IBS", "IBB", "IBBS", "IHC", "IFC", "IDS", "IVBS", "IOBTB", "ICH", "ICI", "ICN", "ICS", "ICV", "ID", "TBX", "IDCF", "IDF6P", "IDJ", "IDF", "ISW", "IESW", "IDPS", "I18ISSW", "IDM", "IDT", "IE", "IHTR", "IEFP", "IEB", "IEBL", "IEBR", "IPLS", "IPS"],
minLength: 1,
select: function(event, ui) {
jQuery("#accordion").accordion( "option", "active", ( "h3#" + ( jQuery(this).text() ) ) );
}
});
Each time a suggestion is selected, only the first element of the accordion is toggled open/closed as if the callback selector is being ignored? Am I making a stupid mistake somewhere? Any suggestions are welcome as I've been fiddling with this far too long.
Thanks.