I need to save the resized height of a panel to local storage / cooke and then when the user opens the page again set the panel to the previous height.
I do not need help saving and getting cookies, but how can I capture the user resizing a panel which is inside a layout ??
<layout id="sqlpan">
<region=north>
<region=center>
$(document).ready(function() {
setTimeout(function(){
$('#sqlpan').layout('panel', 'north').panel({
onResize: function(h,w) {
[save h to cookie]
}
}).resize({height:[get h from cookie]})
})
})
Update - it appears that you have to wrap it in a timeout to push to the bottom of the stack as the layout is not ready when the document ready() fires.
But how can I programatically resize the HEIGHT of the north panel ??