Better way to position hidden menu?

Better way to position hidden menu?

Hi.

I've written a small plugin for a popup menu. The menu html gets sent with the original page load, when my plugin is called it's positioned relative to the trigger via the JQuery position arguments (my, at, of) and hidden until the trigger is clicked.

Now, the trigger element may be replaced via an AJAX call and it's position may change. So I have bound the trigger with 'on()' and the menu positioned in the click handler instead of at setup, no problems. However since JQuery UI position doesn't support positioning of hidden elements I'm having to do...

$(selector).show();
$(selector).position({... 

which makes me wince, I really want to do them the other way around. Is there a better way? Do the JQuery UI team have any plans to support hidden elements?