-
Notifications
You must be signed in to change notification settings - Fork 671
Events
Harold.Luo edited this page May 4, 2015
·
9 revisions
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.
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
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
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}
Triggered before destroy plugin. There is no arguments for it.
triggered after view shown
- event - jQueryEvent : Just a jQuery Event.
triggered after view hidden
- event - jQueryEvent : Just a jQuery Event.