返回介绍

方法函数

发布于 2019-05-19 12:47:25 字数 1915 浏览 1244 评论 0 收藏 0

All At.js events are normal jQuery events. You can bind them in the jQuery way:

$inputor.on("matched.atwho", function(event, flag, query) {
  console.log(event, "matched " + flag + " and the result is " + query);
});

If you have configured alias setting, the event name would be added a suffix.
Suppose your alias setting is at-mentions, so that the event name would be: matched-at-mentions.atwho

And, all event's context is the controller object.

matched.atwho

Triggered after match a word. It would receive these arguments:

  • event - jQuery Event : Just a jQuery Event|
  • flag - String : the at char
  • query - String : Query String

inserted.atwho

Triggered after user choose a popup item in any way. It would receive these arguments:

  • atwho event - jQueryEvent : Just a jQuery Event.
  • $li - jQuery Object : List Item which have been chosen
  • browser event - jQueryEvent : real browser event

reposition.atwho

Triggered after reposition popup . It would receive these arguments:

  • event - jQueryEvent: Just a jQuery Event.
  • offset - Hash : Offset after reposition.Used to .offset jQuery method, the structure looks like it: {left:x, top: y}

beforeDestroy.atwho

Triggered before destroy plugin. There is no arguments for it.

shown.atwho

triggered after view shown

  • event - jQueryEvent : Just a jQuery Event.

hidden.atwho

triggered after view hidden

  • event - jQueryEvent : Just a jQuery Event.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文