forked from mdbootstrap/bootstrap-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap-2.3.2.html
666 lines (636 loc) · 28.4 KB
/
bootstrap-2.3.2.html
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Tags Input</title>
<meta name="robots" content="index, follow" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/bootstrap.min.css">
<link rel="stylesheet" href="../dist/bootstrap-tagsinput.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/themes/github.css">
<link rel="stylesheet" href="http://getbootstrap.com/2.3.2/assets/css/docs.css">
<link rel="stylesheet" href="assets/app.css">
<style>
.accordion { margin-top:-19px; }
</style>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-42755476-1', 'timschlechter.github.io');
ga('send', 'pageview');
</script>
</head>
<body>
<div id="fb-root"></div>
<div class="navbar navbar-inverse navbar-fixed-top bs-docs-nav">
<div class="navbar-inner">
<div class="container">
<div class="nav-collapse collapse bs-navbar-collapse">
<ul class="nav navbar-nav">
<li>
<a href="https://github.com/timschlechter/bootstrap-tagsinput">Code on Github</a>
</li>
<li>
<a href=".">Bootstrap 3</a>
</li>
<li>
<a href="http://timschlechter.github.io/bootstrap-tagsinput/dist/bootstrap-tagsinput.zip">Download <small>(latest)</small></a>
</li>
</ul>
<p class="navbar-text pull-right">
<a href="https://twitter.com/share" class="navbar-link twitter-share-button"
data-hashtags="bootstraptagsinput">Tweet</a>
<script>!function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (!d.getElementById(id)) {
js = d.createElement(s);
js.id = id;
js.src = "//platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
}
}(document, "script", "twitter-wjs");</script>
<!-- Place this tag where you want the +1 button to render. -->
<a class="navbar-link g-plusone" data-size="medium"></a>
<!-- Place this tag after the last +1 button tag. -->
<script type="text/javascript">
(function () {
var po = document.createElement('script');
po.type = 'text/javascript';
po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(po, s);
})();
</script>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=122064240555";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<a class="navbar-link fb-like" data-href="http://timschlechter.github.io/bootstrap-tagsinput/examples/" data-width="110" data-layout="button_count" data-show-faces="true" data-send="false"></a>
</p>
</div>
</div>
</div>
</div>
<header class="jumbotron subhead">
<div class="container">
<h1>Bootstrap Tags Input</h1>
<p>jQuery plugin providing a Twitter Bootstrap user interface for managing tags</p>
</header>
<div class="container">
<section id="examples">
<div class="page-header">
<h2>Examples</h2>
</div>
<div class="example example_markup">
<h3>Markup</h3>
<p>
Just add <code>data-role="tagsinput"</code> to your input field to automatically change it to a tags input field.
</p>
<div class="bs-docs-example">
<input type="text" value="Amsterdam,Washington,Sydney,Beijing,Cairo" data-role="tagsinput" placeholder="Add tags" />
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#accordion_example_markup">
Show code
</a>
</div>
<div id="accordion_example_markup" class="accordion-body collapse">
<div class="accordion-inner">
<pre><code data-language="html"><input type="text" value="Amsterdam,Washington,Sydney,Beijing,Cairo" data-role="tagsinput" placeholder="Add tags" /></code></pre>
</div>
</div>
</div>
</div>
<table class="table table-bordered table-condensed"><thead><tr><th>statement</th><th>returns</th></tr></thead><tbody><tr><td><code>$("input").val()</code></td><td><pre class="val"><code data-language="javascript"></code></pre></td></tr><tr><td><code>$("input").tagsinput('items')</code></td><td><pre class="items"><code data-language="javascript"></code></pre></td></tr></tbody></table>
</div>
<div class="example example_multivalue">
<h3>True multi value</h3>
<p>
Use a <code><select multiple /></code> as your input element for a tags input, to gain true multivalue support. Instead of a comma separated string, the values will be set in an array. Existing <code><option /></code> elements will automatically be set as tags. This makes it also possible to create tags containing a comma.
</p>
<div class="bs-docs-example">
<select multiple data-role="tagsinput">
<option value="Amsterdam">Amsterdam</option>
<option value="Washington">Washington</option>
<option value="Sydney">Sydney</option>
<option value="Beijing">Beijing</option>
<option value="Cairo">Cairo</option>
</select>
</div>
<div class="accordion ">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#example_multivalue">
Show code
</a>
</div>
<div id="example_multivalue" class="accordion-body collapse">
<div class="accordion-inner">
<pre><code data-language="html"><select multiple data-role="tagsinput">
<option value="Amsterdam">Amsterdam</option>
<option value="Washington">Washington</option>
<option value="Sydney">Sydney</option>
<option value="Beijing">Beijing</option>
<option value="Cairo">Cairo</option>
</select></code></pre>
</div>
</div>
</div>
</div>
<table class="table table-bordered table-condensed"><thead><tr><th>statement</th><th>returns</th></tr></thead><tbody><tr><td><code>$("select").val()</code></td><td><pre class="val"><code data-language="javascript"></code></pre></td></tr><tr><td><code>$("select").tagsinput('items')</code></td><td><pre class="items"><code data-language="javascript"></code></pre></td></tr></tbody></table>
</div>
<div class="example example_typeahead">
<h3>Typeahead</h3>
<div class="bs-docs-example">
<input type="text" value="Amsterdam,Washington" />
</div>
<div class="accordion ">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse"href="#example_typeahead">
Show code
</a>
</div>
<div id="example_typeahead" class="accordion-body collapse">
<div class="accordion-inner">
<pre><code data-language="html"><input type="text" value="Amsterdam,Washington" data-role="tagsinput" />
<script>
$('input').tagsinput({
typeahead: {
source: function(query) {
return $.getJSON('citynames.json');
}
}
});
</script></code></pre>
</div>
</div>
</div>
</div>
<table class="table table-bordered table-condensed"><thead><tr><th>statement</th><th>returns</th></tr></thead><tbody><tr><td><code>$("input").val()</code></td><td><pre class="val"><code data-language="javascript"></code></pre></td></tr><tr><td><code>$("input").tagsinput('items')</code></td><td><pre class="items"><code data-language="javascript"></code></pre></td></tr></tbody></table>
</div>
<div class="example example_objects_as_tags">
<h3>Objects as tags</h3>
<p>
Instead of just adding strings as tags, bind objects to your tags. This makes it possible to set id values in your input field's value, instead of just the tag's text.
</p>
<div class="bs-docs-example">
<input type="text" />
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#accordion_example_objects_as_tags">
Show code
</a>
</div>
<div id="accordion_example_objects_as_tags" class="accordion-body collapse">
<div class="accordion-inner">
<pre><code data-language="html"><input type="text" />
<script>
$('input').tagsinput({
itemValue: 'value',
itemText: 'text',
typeahead: {
source: function(query) {
return $.getJSON('cities.json');
}
}
});
$('input').tagsinput('add', { "value": 1 , "text": "Amsterdam" });
$('input').tagsinput('add', { "value": 4 , "text": "Washington" });
$('input').tagsinput('add', { "value": 7 , "text": "Sydney" });
$('input').tagsinput('add', { "value": 10, "text": "Beijing" });
$('input').tagsinput('add', { "value": 13, "text": "Cairo" });
</script></code></pre>
</div>
</div>
</div>
</div>
<table class="table table-bordered table-condensed"><thead><tr><th>statement</th><th>returns</th></tr></thead><tbody><tr><td><code>$("input").val()</code></td><td><pre class="val"><code data-language="javascript"></code></pre></td></tr><tr><td><code>$("input").tagsinput('items')</code></td><td><pre class="items"><code data-language="javascript"></code></pre></td></tr></tbody></table>
</div>
<div class="example example_tagclass">
<h3>Categorizing tags</h3>
<p>
You can set a fixed css class for your tags, or determine dynamically by provinding a custom function.
</p>
<div class="bs-docs-example">
<input type="text" />
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#accordion_example_tagclass">
Show code
</a>
</div>
<div id="accordion_example_tagclass" class="accordion-body collapse">
<div class="accordion-inner">
<pre><code data-language="html"><input type="text" />
<script>
$('input').tagsinput({
tagClass: function(item) {
switch (item.continent) {
case 'Europe' : return 'label label-info';
case 'America' : return 'label label-important';
case 'Australia': return 'label label-success';
case 'Africa' : return 'badge badge-inverse';
case 'Asia' : return 'badge badge-warning';
}
},
itemValue: 'value',
itemText: 'text',
typeahead: {
source: function(query) {
return $.getJSON('cities.json');
}
}
});
$('input').tagsinput('add', { "value": 1 , "text": "Amsterdam" , "continent": "Europe" });
$('input').tagsinput('add', { "value": 4 , "text": "Washington" , "continent": "America" });
$('input').tagsinput('add', { "value": 7 , "text": "Sydney" , "continent": "Australia" });
$('input').tagsinput('add', { "value": 10, "text": "Beijing" , "continent": "Asia" });
$('input').tagsinput('add', { "value": 13, "text": "Cairo" , "continent": "Africa" });
</script></code></pre>
</div>
</div>
</div>
</div>
<table class="table table-bordered table-condensed"><thead><tr><th>statement</th><th>returns</th></tr></thead><tbody><tr><td><code>$("input").val()</code></td><td><pre class="val"><code data-language="javascript"></code></pre></td></tr><tr><td><code>$("input").tagsinput('items')</code></td><td><pre class="items"><code data-language="javascript"></code></pre></td></tr></tbody></table>
</div>
<div id="angular" class="example example_angular" ng-app="AngularExample" ng-controller="CityTagsInputController">
<h3>AngularJS support</h3>
<p>
Include <code>bootstrap-tagsinput-angular.js</code> and register the 'bootstrap-tagsinput' in your Angular JS application to use the bootstrap-tagsinput directive.
</p>
<div class="bs-docs-example">
<bootstrap-tagsinput
ng-model="cities"
typeahead-source="queryCities"
tagclass="getTagClass"
itemvalue="value"
itemtext="text">
</bootstrap-tagsinput>
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#example_angular">
Show code
</a>
</div>
<div id="example_angular" class="accordion-body collapse">
<div class="accordion-inner">
<pre><code data-language="html"><bootstrap-tagsinput
ng-model="cities"
typeahead-source="queryCities"
tagclass="getTagClass"
itemvalue="value"
itemtext="text">
</bootstrap-tagsinput>
<script>
angular.module('AngularExample', ['bootstrap-tagsinput'])
.controller('CityTagsInputController',
function CityTagsInputController($scope) {
// Init with some cities
$scope.cities = [
{ "value": 1 , "text": "Amsterdam" , "continent": "Europe" },
{ "value": 4 , "text": "Washington" , "continent": "America" },
{ "value": 7 , "text": "Sydney" , "continent": "Australia" },
{ "value": 10, "text": "Beijing" , "continent": "Asia" },
{ "value": 13, "text": "Cairo" , "continent": "Africa" }
];
$scope.queryCities = function(query) {
return $http.get('cities.json');
};
$scope.getTagClass = function(city) {
switch (city.continent) {
case 'Europe' : return 'badge badge-info';
case 'America' : return 'label label-important';
case 'Australia': return 'badge badge-success';
case 'Africa' : return 'label label-inverse';
case 'Asia' : return 'badge badge-warning';
}
};
}
);
</script></code></pre>
</div>
</div>
</div>
</div>
<table class="table table-bordered table-condensed">
<thead>
<tr><th>statement</th><th>returns</th></tr>
</thead>
<tbody>
<tr><td><code>$scope.cities</code></td><td><pre><code data-language="javascript">{{cities}}</code></pre></td></tr>
<tr><td><code>$("select").val()</code></td><td><pre class="val"><code data-language="javascript"></code></pre></td></tr>
<tr><td><code>$("select").tagsinput('items')</code></td><td><pre class="items"><code data-language="javascript"></code></pre></td></tr>
</tbody>
</table>
</div>
</section>
<section id="options">
<div class="page-header">
<h2>Options</h2>
</div>
<table class="table table-bordered table-condensed">
<thead>
<tr>
<th colspan="2">option</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2"><code>tagClass</code></td>
<td>
<p>Classname for the tags, or a function returning a classname</p>
<pre><code data-language="javascript">$('input').tagsinput({
tagClass: 'big'
});</code></pre>
<pre><code data-language="javascript">$('input').tagsinput({
tagClass: function(item) {
return (item.length > 10 ? 'big' : 'small');
}
});</code></pre>
</td>
</tr>
<tr>
<td colspan="2"><code>itemValue</code></td>
<td>
<p>When adding objects as tags, itemValue <em>must</em> be set to the name of the property containing the item's value, or a function returning an item's value.</p>
<pre><code data-language="javascript">$('input').tagsinput({
itemValue: 'id'
});</code></pre>
<pre><code data-language="javascript">$('input').tagsinput({
itemValue: function(item) {
return item.id;
}
});</code></pre>
</td>
</tr>
<tr>
<td colspan="2"><code>itemText</code></td>
<td>
<p>When adding objects as tags, you can set itemText to the name of the property of item to use for a its tag's text. You may also provide a function which returns an item's value. When this options is not set, the value of <code>itemValue</code> will be used.
<pre><code data-language="javascript">$('input').tagsinput({
itemText: 'label'
});</code></pre>
<pre><code data-language="javascript">$('input').tagsinput({
itemText: function(item) {
return item.label;
}
});</code></pre>
</td>
</tr>
<tr>
<td colspan="2"><code>confirmKeys</code></td>
<td>
<p>Array of keycodes which will add a tag when typing in the input. (default: [13, 188], which are ENTER and comma)</p>
<pre><code data-language="javascript">$('input').tagsinput({
confirmKeys: [13, 44]
});</code></pre>
</td>
</tr>
<tr>
<td colspan="2"><code>maxTags</code></td>
<td>
<p>When set, no more than the given number of tags are allowed to add (default: undefined). When maxTags is reached, a class 'bootstrap-tagsinput-max' is placed on the tagsinput element. (default: undefined)</p>
<pre><code data-language="javascript">$('input').tagsinput({
maxTags: 3
});</code></pre>
</td>
</tr>
<tr>
<td colspan="2"><code>maxChars</code></td>
<td>
<p>Defines the maximum length of a single tag. (default: undefined)</p>
<pre><code data-language="javascript">$('input').tagsinput({
maxChars: 8
});</code></pre>
</td>
</tr>
<tr>
<td colspan="2"><code>trimValue</code></td>
<td>
<p>When true, automatically removes all whitespace around tags. (default: false)</p>
<pre><code data-language="javascript">$('input').tagsinput({
trimValue: true
});</code></pre>
</td>
</tr>
<tr>
<td colspan="2"><code>allowDuplicates</code></td>
<td>
<p>When true, the same tag can be added multiple times. (default: false)</p>
<pre><code data-language="javascript">$('input').tagsinput({
allowDuplicates: true
});</code></pre>
</td>
</tr>
<tr>
<td colspan="2"><code>maxChars</code></td>
<td>
<p>Defines the maximum length of a single tag.</p>
<pre><code data-language="javascript">$('input').tagsinput({
maxChars: 8
});</code></pre>
</td>
</tr>
<tr>
<td colspan="2"><code>freeInput</code></td>
<td>
<p>Allow creating tags which are not returned by typeahead's source (default: true)</p>
<div class="alert alert-block">
This is only possible when using string as tags. When itemValue option is set, this option will be ignored.
</div>
<pre><code data-language="javascript">$('input').tagsinput({
typeahead: {
source: ['Amsterdam', 'Washington', 'Sydney', 'Beijing', 'Cairo'],
freeInput: true
}
});</code></pre>
</td>
</tr>
<tr>
<td colspan="2"><code>typeahead</code></td>
<td><p>Object containing typeahead specific options</td>
</tr>
</tr>
<tr>
<td></td>
<td><code>source</code></td>
<td>
<p>An array (or function returning a promise or array), which will be used as source for a typeahead.
<pre><code data-language="javascript">$('input').tagsinput({
typeahead: {
source: ['Amsterdam', 'Washington', 'Sydney', 'Beijing', 'Cairo']
}
});</code></pre>
<pre><code data-language="javascript">$('input').tagsinput({
typeahead: {
source: function(query) {
return $.get('http://someservice.com');
}
}
});</code></pre>
</td>
</tr>
<tr>
<td colspan="2"><code>onTagExists</code></td>
<td><p>Function invoked when trying to add an item which allready exists. By default, the existing tag hides and fades in.
<pre><code data-language="javascript">$('input').tagsinput({
onTagExists: function(item, $tag) {
$tag.hide.fadeIn();
}
});</code></pre>
</td>
</tr>
</tbody>
</table>
</section>
<section id="methods">
<div class="page-header">
<h2>Methods</h2>
</div>
<table class="table table-bordered table-condensed">
<thead>
<tr>
<th>method</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>add</code></td>
<td>
<p>Adds a tag</p>
<pre><code data-language="javascript">$('input').tagsinput('add', 'some tag');</code></pre>
<pre><code data-language="javascript">$('input').tagsinput('add', { id: 1, text: 'some tag' });</code></pre>
</td>
</tr>
<tr>
<td><code>remove</code></td>
<td>
<p>Removes a tag</p>
<pre><code data-language="javascript">$('input').tagsinput('remove', 'some tag');</code></pre>
<pre><code data-language="javascript">$('input').tagsinput('remove', { id: 1, text: 'some tag' });</code></pre>
</td>
</tr>
<tr>
<td><code>removeAll</code></td>
<td>
<p>Removes all tags</p>
<pre><code data-language="javascript">$('input').tagsinput('removeAll');</code></pre>
</td>
</tr>
<tr>
<td><code>focus</code></td>
<td>
<p>Sets focus in the tagsinput</p>
<pre><code data-language="javascript">$('input').tagsinput('focus');</code></pre>
</td>
</tr>
<tr>
<td><code>input</code></td>
<td>
<p>Returns the tagsinput's internal <input />, which is used for adding tags. You could use this to add your own typeahead behaviour for example.</p>
<pre><code data-language="html">var $elt = $('input').tagsinput('input');</code></pre>
</td>
</tr>
<tr>
<td><code>refresh</code></td>
<td>
<p>Refreshes the tags input UI. This might be usefull when you're adding objects as tags. When an object's text changes, you'll have to refresh to update the matching tag's text.</p>
<pre><code data-language="javascript">$('input').tagsinput('refresh');</code></pre>
</td>
</tr>
<tr>
<td><code>destroy</code></td>
<td>
<p>Removes tagsinput behaviour</p>
<pre><code data-language="javascript">$('input').tagsinput('destroy');</code></pre>
</td>
</tr>
</tbody>
</table>
</section>
<section id="methods">
<div class="page-header">
<h2>Events</h2>
</div>
<table class="table table-bordered table-condensed">
<thead>
<tr>
<th>event</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>beforeItemAdd</code></td>
<td>
Triggered just before an item gets added. Example:
<pre><code data-language="javascript">$('input').on('beforeItemAdd', function(event) {
// event.item: contains the item
// event.cancel: set to true to prevent the item getting added
});</code></pre>
</td>
</tr>
<tr>
<td><code>itemAdded</code></td>
<td>
Triggered just after an item got added. Example:
<pre><code data-language="javascript">$('input').on('itemAdded', function(event) {
// event.item: contains the item
});</code></pre>
</td>
</tr>
<tr>
<td><code>beforeItemRemove</code></td>
<td>
Triggered just before an item gets removed. Example:
<pre><code data-language="javascript">$('input').on('beforeItemRemove', function(event) {
// event.item: contains the item
// event.cancel: set to true to prevent the item getting removed
});</code></pre>
</td>
</tr>
<tr>
<td><code>itemRemoved</code></td>
<td>
Triggered just after an item got removed. Example:
<pre><code data-language="javascript">$('input').on('itemRemoved', function(event) {
// event.item: contains the item
});</code></pre>
</td>
</tr>
</tbody>
</table>
</section>
</div>
<footer class="footer">
<p>Code licensed under <a href="https://raw.github.com/TimSchlechter/bootstrap-tagsinput/master/LICENSE" target="_blank">MIT License</a></p>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.20/angular.min.js"></script>
<script src="../dist/bootstrap-tagsinput.min.js"></script>
<script src="../dist/bootstrap-tagsinput/bootstrap-tagsinput-angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/js/rainbow.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/js/language/generic.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/js/language/html.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/js/language/javascript.js"></script>
<script src="assets/app_bs2.js"></script>
<script src="assets/app.js"></script>
</body>
</html>