Tabs ajax loaded newPanel height is wrong, why?

Tabs ajax loaded newPanel height is wrong, why?

Hello programmers,
this time i have an issue in ajax loaded panel Tabs.
The problem is in the following code example:

  1.     $("#tabbed").tabs({
  2.         activate: function (e, ui) {
  3.               ui.oldPanel.show();
  4.               var pheight = { n: ui.newPanel.height(), o: ui.oldPanel.height() };
  5.               ui.newPanel.hide();
  6.        }});

For my purpose i need to re-show for a while the old panel and hide the new, make some operations and next reverse them.

The big problem is that when i click the first time on a new tab, the  ui.newPanel.height()  property is near to 0 (about  0.6000003814698012 ), but obviously the real (and visible height) of it isn't that but much bigger.

Please, someone can explain me what is wrong and how to fix it?

thanks in advance at all