tagmanager
tagmanager copied to clipboard
Adding callbacks for AjaxPush
In the API I could not find any way to add callbacks for AjaxPush (POST a request when a user creates a tag). Am I missing something?
In the latest code TagManager emits events tm:pushing
before and tm:pushed
after the Ajax push. You can subscribe to these using jQuery.
Leaving this issue open as we need to document it.
Is it possible to get an example how to use this events ?
Example:
$('input#tag-box').on('tm:pushing', function(event, tag, tagId) {
alert("Added: " + tag);
});
$('input#tag-box').on('tm:popping', function(event, tag, tagId) {
alert("Removed: " + tag);
});