Skip to content

Commit 82bf9d1

Browse files
authored
Merge pull request #624 from swisnl/docs-getting-started
Add `getting started` to the documentation.
2 parents d024bee + efb9008 commit 82bf9d1

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

documentation/index.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,25 @@ Once a menu is registered, it cannot be altered. That means no commands can be a
2626

2727
As of version 1.5 context menus can be created dynamically. That means the described behavior (once created, cannot be altered) still applies - but can be circumvented. Menus can be created on demand and they can be different depending on the triggering element.
2828

29+
## Getting started
30+
31+
If you use NPM, install the `jquery-contextmenu` and include it in your build process.
32+
33+
If you just want to load the library into your website you can either donwload the contents of the `dist` folder or use [cdnjs.com](https://cdnjs.com/libraries/jquery-contextmenu).
34+
35+
```
36+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
37+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-contextmenu/2.6.4/jquery.contextMenu.min.css"></script>
38+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-contextmenu/2.6.4/jquery.contextMenu.min.js"></script>
39+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-contextmenu/2.6.4/jquery.ui.position.js"></script>
40+
```
41+
42+
1. Download contents of the `dist` folder of this library to you project site, for example to `scripts/contextmenu`
43+
2. `<script src="scripts/jquery-3.2.1.min.js"></script>`
44+
3. `<script src="scripts/contextmenu/jquery.contextMenu.js"></script>`
45+
4. `<script src="scripts/contextmenu/jquery.ui.position.min.js"></script>`
46+
5. `<link rel="stylesheet" href="scripts/contextmenu/jquery.contextMenu.min.css">`
47+
2948
## Features
3049

3150
* trigger contextMenu with right-click, [left-click](demo/trigger-left-click.html), [hover](demo/trigger-hover.html) or own [custom trigger](demo/trigger-custom.html) events

0 commit comments

Comments
 (0)