Skip to content

html5 & callback is not actually working #564

Open
@t4r7s

Description

@t4r7s

The callback in code below is not actually working. What to do in case of html5 menu?

$.contextMenu({
	selector: '.context-menu-one', 
	callback: function(key, options) {
        var m = "global: " + key;
		console.log("callback");
        window.console && console.log(m) || alert(m);
    },
	items: $.contextMenu.fromMenu($('#html5menu'))
});

HTML:

<p><span class="context-menu-one">right click me</span></p>


<menu id="html5menu" type="context" style="display:none">
	<command label="rotate" onclick="alert('rotate')" icon="images/cut.png">
	<command label="resize" onclick="alert('resize')" icon="images/door.png">
	<menu label="share">
		<command label="twitter" onclick="alert('twitter')" icon="images/page_white_copy.png">
		<hr>
		<command label="facebook" onclick="alert('facebook')" icon="images/page_white_edit.png">
		<hr>
		<label>foo bar<input type="text" name="foo"></label>
	</menu>
</menu>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions