| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
10年前发布

创建输入自动完成功能非常实用的脚本:At.js

创建自动完成功能非常实用的脚本:At.js
At.js - 非常实用的脚本用于创建输入自动完成功能 (使用 Emojify 的示例).

$('.atwho-inputor').atwho({    at: "@", data: ["one", "two", "three"],  });

还有一个库叫Typehead来自推ter也实现了同样功能。

特性

  • Support IE 7+ for textarea.
  • Supports HTML5 contentEditable elements (NOT include IE 8)
  • Can listen to any character and not just '@'. Can set up multiple listeners for different characters with different behavior and data
  • Listener events can be bound to multiple inputors.
  • Format returned data using templates
  • Keyboard controls in addition to mouse
    • Tab or Enter keys select the value
    • Up and Down navigate between values (and Ctrl-P and Ctrl-N also)
    • Right and left will re-search the keyword.
    </li>
  • Custom data handlers and template renderers using a group of configurable callbacks
  • Supports AMD
  • </ul>


     

    项目主页:http://www.open-open.com/lib/view/home/1416822141827

 本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1416822141827.html
At.js JavaScript开发工具包