Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,29 @@ Features:
2. Paste the link to your image into [the editor](http://arturi.github.io/labelmaker/editor/), then use it to add tags and comments
3. Add your image and the tag data generated by the editor to your page:

```
<img src="IMG_1707.jpg" class="labelmaker">
<ul class="labelmaker-points">
<li data-left="80" data-top="80">Orange juice</li>
<li data-left="80" data-top="45">Yummy peaches</li>
</ul>
```
```html
<img src="IMG_1707.jpg" class="labelmaker">
<ul class="labelmaker-points">
<li data-left="80" data-top="80">Orange juice</li>
<li data-left="80" data-top="45">Yummy peaches</li>
</ul>
```

4. Add jQuery and Labelmaker, then run Labelmaker, passing the image and the tag data block to it:

```
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="jquery.labelmaker.min.js"></script>
<link href="labelmaker.min.css" rel="stylesheet">
```html
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="jquery.labelmaker.min.js"></script>
<link href="labelmaker.min.css" rel="stylesheet">

<script>
$('.labelmaker').labelmaker($('.labelmaker-points'));
</script>
```
<script>
$('.labelmaker').labelmaker($('.labelmaker-points'));
</script>
```

## Settings
You can choose whether to show comments on click or hover. Click is the default, so if you want hover:
```

```js
$('.labelmaker').labelmaker($('.labelmaker-points’), {showOn: 'hover'});
```