5
shinwood 2014-11-21 20:53:29 +08:00
代码当中有:
$("#reply_content").textcomplete([{ match: /(^|\s)@(\w*)$/, search: function (term, callback) { term = term.toLowerCase(); var words = ['Just1n', 'Mihuwa', 'yautou']; callback($.map(words, function (word) { return word.toLowerCase().indexOf(term) === 0 ? word : null; })); }, replace: function (value) { return '$1@' + value + ' ';; } }]); 肯定是原生支持了。 |
6
0x142857 2014-11-21 21:15:45 +08:00
Nice.
|