阿西河

所有教程

公众号
🌙
阿西河前端的公众号

我的收藏

    最近访问  (文章)

      教程列表

      抓包专区
      测试专区

      插件 jQuery.textcomplete 中文API文档

      插件 jQuery.textcomplete 中文API文档 https://github.com/yuku/jquery-textcomplete jquery-textcomplete is no longer maintained. Please use yuku-t/textcomplete instead.

      Autocomplete for Textarea

      npm versionBower versionAnalytics

      Introduces autocompleting power to textareas, like a GitHub comment form has.

      Demo

      Demo.

      Synopsis

      $('textarea').textcomplete([{
          match: /(^|\b)(\w{2,})$/,
          search: function (term, callback) {
              var words = ['google', 'facebook', 'github', 'microsoft', 'yahoo'];
              callback($.map(words, function (word) {
                  return word.indexOf(term) === 0 ? word : null;
              }));
          },
          replace: function (word) {
              return word + ' ';
          }
      }]);
      

      Dependencies

      • jQuery (>= 1.7.0) OR Zepto (>= 1.0)

      Documents

      See doc dir.

      License

      Licensed under the MIT License.

      Contributors

      Patches and code improvements were contributed by:

      https://github.com/yuku-t/jquery-textcomplete/graphs/contributors

      目录
      目录