I’m trying to extend the jQuery autocomplete plugin with something as simple as:
Superbox = {
//Options to be used as defaults
options:{
triggerStart:"@",
triggerEnd:"",
position: { my : "left bottom", at: "left top" }
},
_init: function() {
// stuff
},
_create:function() {
this.triggered = false;
this.element.autocomplete($.extend({
open: function(event, ui) {
.....
$.widget("ui.autocompleteTrigger", Superbox);
Right now I can’t figure out how to override the situation where you see the autosuggest menu, you select an item and the textarea gets focus. How can I override that focus? I can’t find where that binding is in the pluin? After an autosuggest item selection, I want to focus on a different element.
Thank you
You can use the
selectcallback function for this. Something like this should work: