You can do something like this:
$('#wrapper2').layout({
type: 'border',
items: [$('#content'), $('#sidebar'), $('#footer')]
});
Those elements will still need a class of `east`, `north`, `west`,
'south` or `center'. If you want the exact behaviour you specified
you'll need to make a small change in the jLayout jQuery plugin:
Replace:
if (o.type === 'border' && typeof jLayout.border !== 'undefined')
{
$.each(['north', 'south', 'west', 'east', 'center'], function (i, name) {
if (element.children().hasClass(name)) {
o[name] = wrap(element.children('.' + name + ':first'));
}
});
element.data('jlayout', jLayout.border(o));
}
with:
if (o.type === 'border' && typeof jLayout.border !== 'undefined')
{
$.each(['north', 'south', 'west', 'east', 'center'], function (i, name) {
if (o[name]) {
o[name] = wrap[o[name]];
} else if (element.children().hasClass(name)) {
o[name] = wrap(element.children('.' + name + ':first'));
}
});
element.data('jlayout', jLayout.border(o));
}
This should use the region properties supplied in the layout call and
fall back on using class names a region is not found.
Bram
> --
> You received this message because you are subscribed to the Google Groups "jLayout" group.
> To post to this group, send email to jla...@googlegroups.com.
> To unsubscribe from this group, send email to jlayout+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/jlayout?hl=en.
>
>