vudoanthang does not currently provide support for this item.

6 comments found.

How easy is it to place icons?

x-context-menu have 144 icons, please see css/x-context-menu-icons.css file for more detail. The icon is getting from
to defined the new icon, you must create a css class define your’s icon.

  background: url(“your_icon_path/your_icon_name.gif”) no-repeat center;

Next, you add your_class_name to icon property of the menu element. Example:
menu[‘your_element_name’] = {icon:’your_class_name’,text:”Your’s menu text “};



How can I close all open xcontentmenu instances at once when clicking on another?


Hi marcelmeissner. You can close all open xcontextmenu instances by script below


The demo is not working. I am trying it but the default firefox menu appears!

I have tested, it still works normally. which version firefox you are using?

Can this be dynamically generated for items? So let’s say you have 3 items… A, B, C. Can A have a different menu than B and C? Also, does this have full documentation for customizing and adding to a page?

Yes, this be dynamically generated different menu for each item (A,B,C….) in a page and have full document for customizing.

Ok, so I’ve been messing around with this and have been going over the docs, but can’t seem to figure out how to get each menu item to go to different URLs. Is there something I’m missing?

For example: menu[‘link’] = {icon:’link’,text:’Link’,callback:callback}; How would I get this menu item to go to and menu[‘link2’] = {icon:’link’,text:’Link2’,callback:callback}; to go to

Hi Voudini,

This is a example for you.
var menu = {};
var google = function(target,element){
    window.location = '';
var yahoo = function(target,element){
    window.location = '';

menu['copy'] = {text:'Go to google',callback:google};
menu['paste'] = {text:'Go to yahoo',callback:yahoo};