Tag: contextmenu

Defining icons in the contextMenu plugin of jQuery

So far, I was able to create a contextMenu that binds to a right mouse cilck by including the javascript in a html file: var Feature = { register_contextMenu: function() { $.contextMenu({ selector: ‘*’, items: { “item_one”: { name: “Item_one”, icon: “./path1” }, “item_two”: { name: “item_two”, icon: “./path2” } } }); } }; $(document).ready(Feature.register_contextMenu); […]

Capturing the newly created node with JSTree contextmenu

I’m trying to capture the name of the newly created node with jstree‘s contextmenu. I can capture the name of the parent node that I’m adding the new node under (with obj.text()), however, what I really need is the name of the newly created node. So, somehow, there needs to be an “onChange” event that […]

jQuery event contextmenu triggers underlaying div

looking at this event (being bind on 2 divs overlapping each other, look at the jsfiddle) .on(‘contextmenu’, function() { … }); Why do both divs being triggered? How can I detect this and or stop the underlaying div from triggering? DEMO: jsfiddle Thanks for any information!

Modify more than 1 css file with javascript

I’m trying to find a way for modify CSS while HTML is running, so far I find that is possible just with a little script like this next… $(“button”).click(function(){ $(“p”).css(“color”,”red”); }); As I can concern this is an effective way to modify the local CSS stylesheet refered to our HTML while webpage is running (i.e. […]

Disable the context menu in chrome apps?

I am trying to write a chrome app which is set to fullscreen and started with Google’s getting started tutorial from here: https://developer.chrome.com/apps/first_app Now i am trying to disable the context menu which appears on right click. Is that possible? And if so, how? I was searching over and over but couldn’t find a solution. […]

Is it possible to use a variable as a function name

I have a context menu that returns the menu item clicked as a value in a variable, like so. var m = key; The variable can be anything I program, for example; edit, cut, paste or anything else I want. Is it possible to use this variable as a function name? For example: function m() […]

2 jQuery.contextMenu on a page with different trigger

I have 2 instances of jQuery.contexMenu on one page (fiddle example). The first one is triggered on right click, the second one on left. When I perform a right click on the first div (without clicking on any menu item), and an other right click on the second div, the second context menu also appears, […]

How to get id like “invokedOn” text by a right click event with Bootstrap ContextMenu?

I am using Bootstrap 3.0 ContextMenu. here is a link http://jsfiddle.net/KyleMit/X9tgY/ I need to know how i can get the id or data-Id of the clicked element. i try many of the tricks but i cant get the clicked element id? Like when i clicked on “Jacob” row i get the “Jacob” after clicked. I […]

Any way to disable tooltip (title attribute) when right click (contextmenu)?

Using jQuery, I would like the tooltip to work on hover, and context menu to work on right click, but not with the tooltip hovering over my contextmenu. Is this possible?

contextmenu in webbrowser Windows Phone 7

i successfully added a contextmenu to my webbrowser with this javascript code: public void AttachContextMenu() { try { if ((App.Current as App).Browser.IsScriptEnabled) { (App.Current as App).Browser.InvokeScript(“execScript”, “function FindParentLink(item) \r\n{\r\n\tif (!item.parentNode)\r\n\t\treturn null;\r\n\tif (item.tagName.toLowerCase() == ‘a’) \r\n\t{\r\n\t\treturn item;\r\n\t} \r\n\telse \r\n\t{\r\n\t\treturn FindParentLink(item.parentNode);\r\n\t}\r\n}\r\n\r\nfunction FindParentImage(item) \r\n{\r\n\tif (!item.parentNode)\r\n\t\treturn null;\r\n\tif (item.tagName.toLowerCase() == ‘img’) \r\n\t{\r\n\t\treturn item;\r\n\t} \r\n\telse \r\n\t{\r\n\t\treturn FindParentImage(item.parentNode);\r\n\t}\r\n}\r\n\r\nfunction HandleContextMenu() \r\n{\r\n\tvar linkItem = […]