在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:swisnl/jQuery-contextMenu开源软件地址:https://github.com/swisnl/jQuery-contextMenu开源编程语言:HTML 82.5%开源软件介绍:jQuery contextMenu plugin & polyfillfeatures - demo - documentation Dependencies
Usageregister contextMenu from javascript: $.contextMenu({
// define which elements trigger this menu
selector: ".with-cool-menu",
// define the elements of the menu
items: {
foo: {name: "Foo", callback: function(key, opt){ alert("Foo!"); }},
bar: {name: "Bar", callback: function(key, opt){ alert("Bar!") }}
}
// there's more, have a look at the demos and docs...
}); have a look at the demos. Version 3.0 betaVersion 3.0 is a restructure of the javascript into something more sane written in ES6. It consolidates all API's so callbacks are better documented and more concise. The basics are still the same, but all callbacks are structured differently. The goal of this refactor was mostly to make the ContextMenu easier to maintain, and make the API's more consise. It also adds JSdoc comments so the API documentation is generated from the code and it enables code completion. Check out the 3.x branch, or install with HTML5 CompatibilityFirefox 8 implemented contextmenu using the <menuitem> tags for menu-structure. The specs however state that <command> tags should be used for this purpose. $.contextMenu accepts both. Firefox 8 does not yet fully implement the contextmenu specification (Ticket #617528). The elements a, button, input and option usable as commands are being ignored altogether. It also doesn't (optically) distinguish between checkbox/radio and regular commands (Bug #705292). Note: While the specs note <option>s to be renderd as regular commands, $.contextMenu will render an actual <select>. import contextMenu from HTML5 <menu>: $.contextMenu("html5"); Interaction PrinciplesYou're (obviously) able to use the context menu with your mouse. Once it is opened, you can also use the keyboard to (fully) navigate it.
Besides the obvious, browser also react to alphanumeric key strokes. Hitting Authors
License$.contextMenu is published under the MIT license This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats. Special thanksFont-Awesome icons used from encharm/Font-Awesome-SVG-PNG.
SWIS |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论