[jQuery] Manipulate elements in new window (context)

[jQuery] Manipulate elements in new window (context)


Hello,
I'm using:
var plan = window.open("tmp.htm", "plan");
$("#header", plan.document).hide();
$("#main").hide();
* it's bind to a button onclick event
to open a new window and manipulate it, but when I execute it
nothing have happened in the new window.
When I trace down with firebug everything happens as expected - the
#header is hidden.
In the both cases the #main in the parent window is hidden.
If you can point me to what is wrong, I would appreciate it.
Thanks,
Evgeni