Context Menu

Posted on 2012-08-16
Last Modified: 2012-08-30
Ive been trying to get an example of a context menu working as simply as possible, but for some reason I cannot get it to work. Ive been playing with this on and off for a few months now, but really need to get it working, so requesting any experts help

My code stands at:-
<!DOCTYPE html>
<html xmlns="" xml:lang="de" lang="de">
    <meta charset="utf-8" />
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>jQuery contextMenu</title>

    <script src="jquery-1.8.0.min.js" type="text/javascript"></script>
    <script src="jquery-ui-1.8.23.custom.min.js" type="text/javascript"></script>
    <script src="jquery.contextMenu.js" type="text/javascript"></script>
<div id="div_666" class="context-menu-one box menu-1">
    <strong>right click me</strong>
    <script type="text/javascript">
                selector: '.context-menu-one', 
                callback: function(key, options) {
                    var m = "Default Callback clicked: " + key;
                items: {
                    "edit": {name: "Edit", icon: "edit" callback: function(){ alert('boo-' + $(this).attr('id');); } },
                    "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: "quit"}

Open in new window

Ive been using the examples at medialize.github but without any sucess.

If anyone has any advice, I would be extreamly gratful.

Thank you
Question by:tonelm54
    1 Comment
    LVL 14

    Accepted Solution

    jqwidgets has one we have gotten to implement relatively easily:

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    by Julian Matz As of jQuery ( 1.4 the .live() method ( supports custom events as well as some standard JavaScript events that it previously didn't support. Among these is the submit event. Unlike …
    DOM Attributes and Properties treatment with jQuery 1.6 by Ivo Stoykov jQuery ( 1.6 introduces .prop() ( and .removeProp() ( methods which allow modifying or removi…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now