I am trying to add to the context menu programmatically in Javascript. The model I'm using is vsync's answer here: https://stackoverflow.com/a/9293946/322537
And I am changing it into Javascript. What I have you can see in this fiddle:
http://jsfiddle.net/pB76y/
..
As you can see, if you right click the upper image you can see the new context menu 'View Plate Thumbnail'.
But if you change the id of the menu from 'menu_from_image' to 'menu_from_image_js' (which is the javascript version), then you should get the lower image behaving the same way. But it doesn't.
Why?