Use livequery. I attach it to each row in a flexigrid ike this: $('tbody tr').livequery(function() { $(this).contextMenu('ctxMenu', { bindings: { 'map': function(t) { mlsnumber = t.id.split("_"); href='/map_update.php?mlsnumber=' + mlsnumber[1]; $.openWin(href, 'window800'); }, 'flyer': function(t) { mlsnumber = t.id.split("_"); href='/public/pdf_flyer.php?mlsnumber=' + mlsnumber[1]; $.openWin(href, 'window800'); }, 'email': function(t) { mlsnumber = t.id.split("_"); href='/public/email.php?mlsnumber=' + mlsnumber[1]; $.openWin(href, 'window800'); } } }); });
On May 27, 5:47 pm, Mauricio Farah <[EMAIL PROTECTED]> wrote: > Hi, I don't know if it's the right place to post this, but I can't > find developer's email anywhere. In case that you don't know the > pluginhttp://www.trendskitchens.co.nz/jquery/contextmenu/is the > homepage. Basically it let's you override right click on the browser > for the html elements you want, changing it for one that you define. > > The javascript code for the menu is in the $document.ready(), like > this: > > $(document).ready(function() { > $('span.demo1').contextMenu('myMenu1', { > bindings: { > 'open': function(t) { > alert('Trigger was '+t.id+'\nAction was Open'); > }, > 'email': function(t) { > alert('Trigger was '+t.id+'\nAction was Email'); > } > } > }); > > } > > And it works alright. But what I need to do is to show the menu on a > element I dynamically load using $(#id).html("new value"); > After loading the new content, right click doesn't brings context menu > anymore on that element, and I don't know how to fix it. > I think it's more related to plain jQuery than the plugin. > > I hope someone could help me with this. > > Thanks in advance.