yuku-t/jquery-textcomplete — pull request #88 by jedireza (2014-06-20 22:04:49+00:00)
Title: option to supply list view position function

I had a use case where I needed to position the list myself instead of following the cursor. My text area was pretty small (in a narrow column) and near the edge of the window and I wanted the list to display in a specific position.

I'm hoping you'll see that this is a simple but useful change to consider.

Usage example:

```js
$('textarea').textcomplete([
{ // emoji strategy
match: /(^|\s):(\w*)$/,
search: function (term, callback) {
var regexp = new RegExp('^' + term);
callback($.grep(emojies, function (emoji) {
return regexp.test(emoji);
}));
},
replace: function (value) {
return '$1:' + value + ': ';
}
}
], {
listPosition: function (position) {
this.$el.css({
top: 'auto',
bottom: 50,
left: 0
});
return this;
}
});
```