[jQuery] dynamic height

[jQuery] dynamic height


hey list
i am quite new to jquery and jscrollpane in general. i could setup
everything with custom handels but i do not know how i can
dynamically change the height of the scrolling div. for other
elements in the website it works but for the scrolling i need to
refresh the page in order to resize the div. actually the div is
resized via jquery before but it does not influence jscrollpane.
simplified code used:
function content_resize() {
$j( '#scrollregion' ).css( {height: dynheight } );
$j('#scrollregion').jScrollPane({showArrows:true});
}
$j(document).ready(function() {
$j( window ).resize( content_resize );
}
why is this not working, or otherwise how can i reinitalize
jscrollpane after/while resizing the browser window ?
any help would be really welcome as i already lost hours trying to
find a solution.
all the best
m