views:

155

answers:

0

Hi all!

I m using jquery ui layout to create 3 panel on a webpage, north, west and center.

The north panel needs to be auto sized based on the contents added via ajax calls. The contents are block level. so i am using this function to resize the north panel when a block is added to north panel ..

layout.sizePane('north',layout.state.north.size + $('#content_div_id').outerHeight(true));

and when the box is removed use this to resize --

layout.sizePane('north',layout.state.north.size - $('#content_div_id').outerHeight(true));

Which i thought would do the resizing effectively, as i m taking account of the margin of the box element too.

But its not getting done right. The panel grows ok, but shrinks even more than specified.

May be my conception is not quite right about it. So, help anyone?

Thanks, Anjan