This repository has been archived by the owner on Apr 2, 2023. It is now read-only.
/
index.html
67 lines (66 loc) · 1.9 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>Tagator Plugin</title>
<link rel="stylesheet" href="fm.tagator.jquery.css"/>
<style>
body {
font-family: sans-serif;
margin: 0;
padding: 0;
}
#wrapper {
padding: 15px;
}
#input_tagator1 {
width: 300px;
}
#input_tagator2 {
width: 300px;
}
</style>
<script src="jquery-1.11.0.min.js"></script>
<script src="fm.tagator.jquery.js"></script>
<script>
$(function () {
var $input_tagator1 = $('#input_tagator1');
var $activate_tagator1 = $('#activate_tagator1');
$activate_tagator1.click(function () {
if ($input_tagator1.data('tagator') === undefined) {
$input_tagator1.tagator({
autocomplete: ['first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'eighth', 'ninth', 'tenth'],
useDimmer: true
});
$activate_tagator1.val('destroy tagator');
} else {
$input_tagator1.tagator('destroy');
$activate_tagator1.val('activate tagator');
}
});
$activate_tagator1.trigger('click');
});
</script>
</head>
<body>
<div id="wrapper">
<h3>
Normal initialization
</h3>
<pre>
$('#input_tagator1').tagator({
autocomplete: ['first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'eighth', 'ninth', 'tenth'],
useDimmer: true
});
</pre>
<input id="input_tagator1" name="input_tagator1" value="Test,Best,Rest" placeholder="Please input some tags">
<input value="activate tagator" id="activate_tagator1" type="button">
<br>
<br>
<h3>
Markup initialization
</h3>
<pre><input value="test,123" class="tagator" data-datetator-show-all-options-on-focus="true" data-tagator-autocomplete="['first', 'second', 'third']"></pre>
<input id="activate_tagator2" type="text" class="tagator" value="test,123" data-tagator-show-all-options-on-focus="true" data-tagator-autocomplete="['first', 'second', 'third']">
</div>
</body>
</html>