-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
45 lines (39 loc) · 1.3 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>jQuery pstagger plugin by PrestaShop</title>
<link rel="stylesheet" href="example.css" />
<link rel="stylesheet" href="jquery.pstagger.css" />
</head>
<body>
jQuery pstagger Example:
<hr/>
<div class="wrapper">
<input id="pstagger-bar" type="text"/>
</div>
<hr/>
Currently tagged:
<div id="example1-tags">
</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script type="text/javascript" src="jquery.pstagger.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#pstagger-bar').pstagger({
inputPlaceholder: 'Add tag ...',
clearAllBtn: true,
clearAllIconClassAdditional: 'myIconClass',
onTagsChanged: onTagsChange,
onResetTags: onReset,
});
});
function onTagsChange(tagsList) {
$('#example1-tags').html(tagsList.join(', '));
}
function onReset() {
$('#example1-tags').empty();
}
</script>
</body>
</html>