Hello,
is it possible to initialize a context menu before its target is existing in the DOM? I want to have the context menu on a grid which is initialized sometime later. Here is a simple example which will show you what I tried to do:
I know that it would work if I append the div before I initialize the context menu but I would like to define it for every element with the same ID no matter when it will appear in the DOM. Is there any possibility to do this?
Thank you
is it possible to initialize a context menu before its target is existing in the DOM? I want to have the context menu on a grid which is initialized sometime later. Here is a simple example which will show you what I tried to do:
$(
"#context-menu"
).kendoContextMenu({
target:
"#target"
});
$(
'body'
).append(
'<div id="target">Target</div>'
);
I know that it would work if I append the div before I initialize the context menu but I would like to define it for every element with the same ID no matter when it will appear in the DOM. Is there any possibility to do this?
Thank you