jQuery Mouse Right-Click Context Menu Plugin (Original)

Add-ons
2026-07-21 13:14 5 次浏览 • 0 次下载 3.8KB
jQuery Mouse Right-Click Context Menu Plugin (Original)

Last Updated: 2021-03-23 00:13:02

Changelog:Improved styling and added themes.


Last Updated: 2021-03-16 00:17:30

Changelog:Improved the styling.


Last Updated: 2021-03-16 00:05:09

Usage

Include the JavaScript and CSS files.

1
2
3
4
<link rel="stylesheet" type="text/css" href="css/context-menu.css"/>
<script src="js/context-menu.js"></script>

Usage:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
$("#menu4").mouseMenu({
// Level 1 Menu
options: [{
title: 'Refresh',
// Submenus are automatically disabled.
disabled: true,
icon: '<i class="fa fa-refresh"></i>',
child: [{
title: 'Refresh Current',
icon: '<i class="fa fa-android"></i>'
},
{
title: 'Refresh All',
icon: '<i class="fa fa-apple"></i>'
},
]
}, {
title: 'Lock',
icon: '<i class="fa fa-lock"></i>'
}, {
title: 'Close',
icon: '<i class="fa fa-close"></i>',
child: [{
title: 'Close Current',
icon: '<i class="fa fa-camera"></i>'
},
{
title: 'Close Others',
icon: '<i class="fa fa-calendar"></i>'
},
{
title: 'Close All',
disabled: true,
icon: '<i class="fa fa-database"></i>'
}
],
}, {
title: 'Open in New Window',
icon: '<i class="fa fa-plus"></i>'
}, ],
afterInit: function(ul) { // Display the menu after initialization
ul.css({
'top': 100,
'left': 710
}).show();
}
});

If you need to dynamically change the disabled property or modify menu options, simply call the mouseMenu method again and set the disabled property as needed.

星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare