Skip to content

Add getting started to the documentation. #624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 10, 2018
Merged
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
19 changes: 19 additions & 0 deletions documentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,25 @@ Once a menu is registered, it cannot be altered. That means no commands can be a

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.

## Getting started

If you use NPM, install the `jquery-contextmenu` and include it in your build process.

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).

```
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-contextmenu/2.6.4/jquery.contextMenu.min.css"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-contextmenu/2.6.4/jquery.contextMenu.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-contextmenu/2.6.4/jquery.ui.position.js"></script>
```

1. Download contents of the `dist` folder of this library to you project site, for example to `scripts/contextmenu`
2. `<script src="scripts/jquery-3.2.1.min.js"></script>`
3. `<script src="scripts/contextmenu/jquery.contextMenu.js"></script>`
4. `<script src="scripts/contextmenu/jquery.ui.position.min.js"></script>`
5. `<link rel="stylesheet" href="scripts/contextmenu/jquery.contextMenu.min.css">`

## Features

* 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
Expand Down