forked from elcramos/Jquery-Photo-Tag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Instructions.txt
31 lines (25 loc) · 1.16 KB
/
Instructions.txt
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
Demo and unit testing: tests/photo_tags/index.html
1. Reference css and javascript files:
<script src="../../libraries/jquery.dev.1.7.1.js" type="text/javascript"></script>
<script src="../../libraries/jquery-ui-1.8.17.custom.min.js" type="text/javascript"></script>
<script src="../../js/jquery.phototag.js" type="text/javascript"></script>
<link rel="stylesheet" href="../../libraries/jquery-ui-1.8.17.custom.css" type="text/css" media="screen" />
<link rel="stylesheet" href="styles2.css" type="text/css" media="screen" />
2. Call the photo tag plguin on load:
$(document).ready(function(){
$('.photoTag').photoTag({
requesTagstUrl: '/static/photo-tag/tests/photo_tags/photo-tags.php',
deleteTagsUrl: '/static/photo-tag/tests/photo_tags/delete.php',
addTagUrl: '/static/photo-tag/tests/photo_tags/add-tag.php',
parametersForNewTag: {
name: {
parameterKey: 'name',
isAutocomplete: true,
autocompleteUrl: '/static/photo-tag/tests/photo_tags/names.php',
label: 'Name'
}
}
});
});
3. Add the image
<img src="http://karlmendes.com/static/photo-tag/tests/photo_tags/monkeys2.jpg" class="photoTag" data-user-id="25" data-image-id="200" data-album-id="200">