|
我也出现这种问题,半天都没有解决掉!
apiready = function () {
funIniGroup();
}
function funIniGroup(){
var eHeaderLis = $api.domAll('#footer li'),
frames = [];
for (var i = 0,len = eHeaderLis.length; i < len; i++) {
frames.push( {
name: 'frame'+i,
url: './html/frame'+i+'.html',
bgColor : 'rgba(0,0,0,.2)',
bounces:true
} )
}
api.openFrameGroup({
name: 'group',
scrollEnabled: false,
rect: {
x: 0,
y: 0,
w: api.winWidth,
h: $api.dom('#main').offsetHeight
},
index: 0,
frames: frames
}, function (ret, err) {
});
}
// 随意切换按钮
function randomSwitchBtn( tag ) {
if( tag == $api.dom('#footer li.active') )return;
var eFootLis = $api.domAll('#footer li'),
index = 0;
for (var i = 0,len = eFootLis.length; i < len; i++) {
if( tag == eFootLis ){
index = i;
}else{
$api.removeCls(eFootLis, 'active');
}
}
$api.addCls( eFootLis[index], 'active');
if(index!=1){
api.setFrameGroupAttr({
name: 'group2',
hidden:true
});
}else{
api.setFrameGroupAttr({
name: 'group2',
hidden:false
});
}
api.setFrameGroupIndex({
name: 'group',
index: index
});
} |
|