jQuery Context Menu Plugin NZMenu (Original)

Last Updated: 2022-01-13 11:20:20
Changelog:
1. Fixed an issue where right-clicking again to expand a context menu would reopen a new menu.
2. Minor refinements.
Last Updated: 2020-02-07 00:40:04
ChangelogVersion: 2.8.0
1. Added support for submenus.
2. Added support for custom image icons.
3. Fixed several bugs.
4. Optimized styles and performance.
Last Updated: 2019-11-13 00:36:32
NZMenu
Part of the same family as NZ-Window, this plugin features a clean, dynamic design, with careful attention given to every detail.
Basic Usage:
1 2 3 4 5 6 7 8 9 10 11 12 13 | $("#demo").NZ_Menu({ items: [{ name: "Copy", event: function() { alert("Copy") } }, { name: "Paste", event: function() { alert("Paste"); } }]}); |
Other usage examples are demonstrated in the included demos.
Menu items support icons. However, after extensive testing, custom icons were removed in favor of FontAwesome icons to ensure a consistent and unified appearance.
All Parameters:
1 2 3 4 5 6 7 8 | { items: [],// Option structure: {icon:"",name:"",classlist:[],event:function() {}} fatype: "fas",// FontAwesome icon types: fas/far bgcolor: "#fff", showbefore: null,// Event before menu creation showafter: null,// Event after menu creation closed:null// Close event} |
Explanation:
The Chinese font files were too large to include in the plugin package and would also negatively affect page loading performance, so they were removed. If needed, you can download the Noto fonts and use the Noto Sans CJK DemiLight style by placing the font files in the appropriate font directory. These are Google's fonts. English text continues to use Google's Roboto font.
Menu grouping, submenus, and other features will be added in future updates.