SimpleTaskSystem.Web/Assets/lib/jquery-easyui-1.4.4/src/jquery.accordion.js
(开头部分) 10KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
* jQuery EasyUI 1.4.4
*
* Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved.
*
* Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php
* To use it on other terms please contact us: info@jeasyui.com
*
*/
/**
* accordion - jQuery EasyUI
*
* Dependencies:
* panel
*
*/
(function($){
function setSize(container, param){
var state = $.data(container, 'accordion');
var opts = state.options;
var panels = state.panels;
var cc = $(container);
if (param){
$.extend(opts, {
width: param.width,
height: param.height
});
}
cc._size(opts);
var headerHeight = 0;
var bodyHeight = 'auto';
var headers = cc.find('>.panel>.accordion-header');
if (headers.length){
headerHeight = $(headers[0]).css('height', '')._outerHeight();
}
if (!isNaN(parseInt(opts.height))){
bodyHeight = cc.height() - headerHeight*headers.length;
}
_resize(true, bodyHeight - _resize(false) + 1);
function _resize(collapsible, height){
var totalHeight = 0;
for(var i=0; i<panels.length; i++){
var p = panels[i];
var h = p.panel('header')._outerHeight(headerHeight);
if (p.panel('options').collapsible == collapsible){
var pheight = isNaN(height) ? undefined : (height+headerHeight*h.length);
p.panel('resize', {
width: cc.width(),
height: (collapsible ? pheight : undefined)
});
totalHeight += p.panel('panel').outerHeight()-headerHeight*h.length;
}
}
return totalHeight;
}
}
后面还有 353 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
