-
Notifications
You must be signed in to change notification settings - Fork 832
/
prototype.js
40 lines (37 loc) · 986 Bytes
/
prototype.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$("#myTags").tagit({
// Options
fieldName: "skills",
availableTags: ["c++", "java", "php", "javascript", "ruby", "python", "c"],
autocomplete: {delay: 0, minLength: 2},
showAutocompleteOnFocus: false,
removeConfirmation: false,
caseSensitive: true,
allowDuplicates: false,
allowSpaces: false,
readOnly: false,
tagLimit: null,
singleField: false,
singleFieldDelimiter: ',',
singleFieldNode: null,
tabIndex: null,
placeholderText: null,
// Events
beforeTagAdded: function(event, ui) {
console.log(ui.tag);
},
afterTagAdded: function(event, ui) {
console.log(ui.tag);
},
beforeTagRemoved: function(event, ui) {
console.log(ui.tag);
},
onTagExists: function(event, ui) {
console.log(ui.tag);
},
onTagClicked: function(event, ui) {
console.log(ui.tag);
},
onTagLimitExceeded: function(event, ui) {
console.log(ui.tag);
}
});