jQuery contextMenu
<link href="<c:url value='/js/map/contexmenu/jquery.contextMenu.css'/>" rel="stylesheet" type="text/css" />
$.contextMenu({
selector: '.test', // class
callback: function(key, options) {
var m = "clicked: " + key;
window.console && console.log(m) || alert(m);
},
items: {
"edit": {name: "Edit", icon: "edit"},
"cut": {name: "Cut", icon: "cut"},
copy: {name: "Copy", icon: "copy"},
"paste": {name: "Paste", icon: "paste"},
"delete": {name: "Delete", icon: "delete"},
"sep1": "---------",
"quit": {name: "Quit", icon: function(){
return 'context-menu-icon context-menu-icon-quit';
}}
}
});
ref : https://swisnl.github.io/jQuery-contextMenu/
그나저나 소스코드 포스팅할 때 쓸 도구 좀 알아봐야 할 듯