Skip to content


Sub Menus not getting displayed correctly #56

AnirbanKundu opened this Issue · 4 comments

2 participants


Hi Rod,

I am using jquery context menu with kendo grid. Whenever the user clicks on the different headers of the grid, the context menu should open up based on the column name - i.e. the context menu items should be populated dynamically.

I have used to create the context menus based on

But I see the sub-menu options are not being correctly displayed. The sub-menu is getting displayed not at the position where the parent menu is opening. Please refer to the fiddle I have created :

If you do a right click on column Header = "colA", you will see a context menu with sub menus.But the sub-menu option is not opening at a position relative to its parent menu. If you click column Header ="colB", you will see a different context menu.

Could you please let me know why the sub-menus are not getting displayed correctly.



I have created a simple fiddle to show that this behavior is uniform for any other control used not for the grid used:

Code I have used is :

$(document).ready(function () {

  selector: ".foo",
  build: function($trigger) {
    var options = {
      callback: function(key, options) {
        var m = "clicked: " + key;
        window.console && console.log(m) || alert(m);
      items: {}

    if ($trigger.hasClass('something')) { = {name: "foo"};
    } else { = {"name": "Other group",
                                "items": {
                                    "fold1a-key1": { "name": "echo" },
                                    "fold1a-key2": { "name": "foxtrot" },
                                    "fold1a-key3": { "name": "golf" }

    return options;



If you add the jQuery UI position plugin to your fiddle, everything works fine. I'll look into what's wrong with the fallback positioning shortly


I've fixed the positioning for missing $.ui.position. Fix is in release 1.5.19.

@rodneyrehm rodneyrehm closed this

Thanks Rod.


@baohx2000 baohx2000 pushed a commit to Contatta/jQuery-contextMenu that referenced this issue
@rodneyrehm rodneyrehm position sub-menu relative to container - Issue #56 9e86ea5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.