Для вашей цели, здесь я приведу еще один пример для этого.http://zkfiddle.org/sample/bk3jop/2-Close-border-layout-panel-by-javascript
<script>
function openNorth(){
var widget = zk.Widget.$("$mynorth"); //Using the pattern for $ + ID to select a ZK widget.
if(!widget.isOpen()){
try{
widget.doClick_({
domTarget:widget.$n('colled')
});
}catch(e){ //ignore unhandled exception.
}
}
}
</script>
В любом случае, это больше похоже на взлом.
Для более подробной информации вы можете обратиться к https://github.com/zkoss/zk/blob/master/zul/src/archive/web/js/zul/layout/LayoutRegion.js
doClick_: function (evt) {
var target = evt.domTarget;
switch (target) {
case this.$n('btn'):
case this.$n('btned'):
case this.$n('splitbtn'):
if (this._isSlide || zk.animating()) return;
if (this.$n('btned') == target) {
var s = this.$n('real').style;
s.visibility = "hidden";
s.display = "";
this._syncSize(true);
s.visibility = "";
s.display = "none";
}
this.setOpen(!this._open);
break;
case this.$n('colled'):
if (this._isSlide) return;
this._isSlide = true;
var real = this.$n('real'),
s = real.style;
s.visibility = "hidden";
s.display = "";
this._syncSize();
this._original = [s.left, s.top];
this._alignTo();
s.zIndex = 100;
if (this.$n('btn'))
this.$n('btn').style.display = "none";
s.visibility = "";
s.display = "none";
zk(real).slideDown(this, {
anchor: this.sanchor,
afterAnima: this.$class.afterSlideDown
});
break;
}
this.$supers('doClick_', arguments);
},