Easyui Layout Center 全屏方法扩展

$.extend($.fn.layout.methods, {
full : function (jq) {
return jq.each(function () {
var layout = $(this);
var center = layout.layout('panel', 'center');
center.panel('maximize');
center.parent().css('z-index', 10);

$(window).on('resize.full', function () {
layout.layout('unFull').layout('resize');
});
});
},
unFull : function (jq) {
return jq.each(function () {
var center = $(this).layout('panel', 'center');
center.parent().css('z-index', 'inherit');
center.panel('restore');
$(window).off('resize.full');
});
}
});

 

$("").layout("full");

$("").layout("unFull");
posted @ 2016-11-07 13:33  芜明-追星  阅读(642)  评论(0编辑  收藏  举报