Skip to content

Commit a8b175c

Browse files
committed
updated README with npm package
1 parent 37b44b0 commit a8b175c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22

33
A simple plugin for creating responsive [image-maps](https://en.wikipedia.org/wiki/Image_map) that rerender on image or viewport changes.
44

5+
### Install with npm
6+
```shell
7+
$ npm install image-map
8+
```
59

6-
## Usage:
10+
## Usage
711
Add an **image-map** to your html page.
812
> An **image-map** is an image with clickable areas. The required `name` attribute of the `<map>` element is associated with the `<img>`'s `usemap` attribute and creates a relationship between the image and the map. The `<map>` element contains a number of `<area>` elements, that defines the clickable areas in the image map.
913
@@ -18,16 +22,16 @@ Add an **image-map** to your html page.
1822
</map>
1923
```
2024

21-
### jQuery:
25+
### jQuery
2226
To use this plugin with jQuery, include both the [jQuery](https://jquery.com/) and `image-map.js` scripts, then simply call:
2327
```js
2428
$('img[usemap]').imageMap();
2529
```
2630

27-
### JavaScript (Vanilla JS):
31+
### JavaScript (Vanilla JS)
2832
To use this plugin with *only* JavaScript, include the `image-map.js` script, then simply call:
2933
```js
3034
ImageMap('img[usemap]')
3135
```
3236

33-
### [Live Demo](https://www.travismclarke.com/imagemap/)
37+
### [Demo](https://www.travismclarke.com/imagemap/)

0 commit comments

Comments
 (0)