update right click menu

This commit is contained in:
bee0005
2016-09-04 14:49:29 +00:00
parent 5e4e8183f6
commit 6645f0fd69
5 changed files with 90 additions and 2 deletions

View File

@@ -0,0 +1,15 @@
function CheckLocation(){
$(document).mousedown(function(e){
// context menu 가 아닌 다른 영역을 클릭한경우 판단
if ($(e.target).parents(".contextmenu").length !== 0)
return;
$(".contextmenu").hide();
$(document).unbind('mousedown');
});
}
function ShowContextMenu(className){
$("."+className).css({
left:event.pageX+"px",
top:event.pageY+"px"
}).show();
}