开发者

controlling links on right mouse clicks in my website

开发者 https://www.devze.com 2023-03-26 12:58 出处:网络
I\'ve been searching for examples of 开发者_Go百科custom on mouse right click menus but i would like to emulate the same options you get when you right click in chrome on a web page Maintaining cut, c

I've been searching for examples of 开发者_Go百科custom on mouse right click menus but i would like to emulate the same options you get when you right click in chrome on a web page Maintaining cut, copy, and paste but also (here is the tricky part) instead of opening a new tab in your browser it opens the same webpage inside an iframe, option.

Thanks


Take a look at this plugin, it might help you

http://plugins.jquery.com/project/jqueryContextMenu


I would suggest hiding the "Window" which will be a div or some HTML element Once user has right clicked on an element you can access it through jquery selectors and enable it's visibility.

css:

#hiddenFrame {

display: none;
width: 250px;
height: 250px;

}


javascript:


menu1 = { attributes: "brief_number,brief_id,...",
  items:  [
                {
                 type:RightContext.TYPE_MENU,
                 text:"some text",
                 onclick:function() {$('#hiddenFrame').show();}
                }
          ]
        };
0

精彩评论

暂无评论...
验证码 换一张
取 消