Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions 15 auto-complete.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,19 @@ var autoComplete = (function(){
else
that.sc.style.display = 'none';
}

// Optional method to trigger results programatically
that.triggerSC = function(data){

if (data.length) {
var s = '';
for (var i=0;i<data.length;i++) s += o.renderItem(data[i], '');
that.sc.innerHTML = s;
that.updateSC(0);
}
else
that.sc.style.display = 'none';
};

that.keydownHandler = function(e){
var key = window.event ? e.keyCode : e.which;
Expand Down Expand Up @@ -208,6 +221,8 @@ var autoComplete = (function(){
that = null;
}
};

return elems;
}
return autoComplete;
})();
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.