for example,
before running the code below,
$('div.goo').length is 5,
$('div.goo).contextMenu(menu2,{triggerOn:'contextmenu'});
but after ,i add one div.goo node,but the event on the new one is not effected
my question is how to fix this porblem.
as we know,in jquery ,we can use "$('body').on('click','div.goo',function() {})" to solve "how to dynamically bind dom evnt",
but in your contextMenu.js,what should i do?
for example,
before running the code below,
$('div.goo').length is 5,
$('div.goo).contextMenu(menu2,{triggerOn:'contextmenu'});but after ,i add one div.goo node,but the event on the new one is not effected
my question is how to fix this porblem.
as we know,in jquery ,we can use "
$('body').on('click','div.goo',function() {})" to solve "how to dynamically bind dom evnt",but in your contextMenu.js,what should i do?