Mauricio,

This sounds like a good place to use the livequery plugin:
http://docs.jquery.com/Plugins/livequery

Its purpose: keeping events properly bound to elements that satisfy a
selector even when the elements are loaded later, or loaded
dynamically.

Good luck.

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.

Reply via email to