ui-contextmenu

WebJar for ui-contextmenu

Лицензия

Лицензия

MIT
Категории

Категории

Github Инструменты разработки Контроль версий
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

github-com-mar10-jquery-ui-contextmenu
Последняя версия

Последняя версия

1.18.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

ui-contextmenu
WebJar for ui-contextmenu
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/mar10/jquery-ui-contextmenu

Скачать github-com-mar10-jquery-ui-contextmenu

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-mar10-jquery-ui-contextmenu/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-mar10-jquery-ui-contextmenu</artifactId>
    <version>1.18.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-mar10-jquery-ui-contextmenu/
implementation 'org.webjars.npm:github-com-mar10-jquery-ui-contextmenu:1.18.1'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-mar10-jquery-ui-contextmenu/
implementation ("org.webjars.npm:github-com-mar10-jquery-ui-contextmenu:1.18.1")
'org.webjars.npm:github-com-mar10-jquery-ui-contextmenu:jar:1.18.1'
<dependency org="org.webjars.npm" name="github-com-mar10-jquery-ui-contextmenu" rev="1.18.1">
  <artifact name="github-com-mar10-jquery-ui-contextmenu" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-mar10-jquery-ui-contextmenu', version='1.18.1')
)
libraryDependencies += "org.webjars.npm" % "github-com-mar10-jquery-ui-contextmenu" % "1.18.1"
[org.webjars.npm/github-com-mar10-jquery-ui-contextmenu "1.18.1"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : jquery jar [1.7,)

Модули Проекта

Данный проект не имеет модулей.

jquery.ui-contextmenu

GitHub version Build Status Selenium Test Status npm jsDelivr,

A jQuery plugin that provides a context menu (based on the standard jQueryUI menu widget).

  • Define menus from <ul> element or definition list (i.e. [{title: "Paste", cmd: "paste"}, ...]).
  • Themable using jQuery ThemeRoller.
  • Supports delegation (i.e. can be bound to elements that don't exist at the time the context menu is initialized).
  • Optional support for touch devices.

Status

The latest release is available at npm Registry:

$ npm install ui-contextmenu

GitHub version See also the Change Log.

Demo

Live demo page:
sample

See also the unit tests and live examples

More:

Getting Started

First, include dependencies:

  • jQuery 1.7+ (3.x or later recommended)
  • jQuery UI 1.9+ (at least core, widget, menu), 1.12+ recommended
  • One of the ThemeRoller CSS themes or a custom one
  • jquery.ui-contextmenu.js (also available as CDN on , cdnjs, or UNPKG)

for example

<head>
    <link href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet" />
    <script src="//code.jquery.com/jquery-3.2.1.min.js"></script>
    <script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
    <script src="assets/jquery.ui-contextmenu.min.js"></script>

Assume we have some HTML elements that we want to attach a popup menu to:

<div id="container">
    <div class="hasmenu">AAA</div>
    <div class="hasmenu">BBB</div>
    <div class="hasmenu">CCC</div>
</div>

Now we can enable a context menu like so:

$("#container").contextmenu({
	delegate: ".hasmenu",
	menu: [
		{title: "Copy", cmd: "copy", uiIcon: "ui-icon-copy"},
		{title: "----"},
		{title: "More", children: [
			{title: "Sub 1", cmd: "sub1"},
			{title: "Sub 2", cmd: "sub1"}
			]}
		],
	select: function(event, ui) {
		alert("select " + ui.cmd + " on " + ui.target.text());
	}
});

Alternatively we can initialize the menu from embedded <ul> markup.

For more information:

Credits

Thanks to all contributors.

Browser Status Matrix

Selenium Test Status

Версии библиотеки

Версия
1.18.1