lastsection.style.display='none';
}else {
// 改变菜单显示滑动速度的比率
aniratio=0.75; // 设定速度
if(availheight>200) {aniratio=0.667;}
if(availheight>500) {aniratio=0.5;} // 根据可利用高度调整速度
lastsection.style.height=availheight;
lastsection.style.overflow='visible';
lastsection.style.display='';
visibleheight=parseint(lastsection.clientheight);
if(visibleheight>availheight) {lastsection.style.overflow='auto';}else{lastsection.style.overflow='hidden';};
}
}
function slidemenu() {
// 菜单滑动函数
if(parseint(lastsection.style.height)>1) {
lastsection.style.height=parseint(parseint(lastsection.style.height)*aniratio);
thissection.style.height=availheight-parseint(lastsection.style.height);
var movetimer=settimeout("slidemenu()",timerdelay) ;
}else {
// 完成菜单滑动,显示新打开的菜单,隐藏前面以打开的菜单
lastsection.style.display='none';
thissection.style.height=availheight;
menuactive=false;
if (visibleheight>availheight) {thissection.style.overflow='auto';};
thissection.style.marginright=0;
lastsection=thissection;
cleartimeout(movetimer);
}
}
function startsection(thesection) {
// 开始滑动菜单,检测是否对菜单进行单击
if(menuactive==false) {
if(lastsection!=thesection) {
menuactive=true;
thissection=thesection;
lastsection.style.overflow='hidden';
thissection.style.overflow='visible';
thissection.style.display='';
visibleheight=parseint(thissection.clientheight);
thissection
}else {
// 改变菜单显示滑动速度的比率
aniratio=0.75; // 设定速度
if(availheight>200) {aniratio=0.667;}
if(availheight>500) {aniratio=0.5;} // 根据可利用高度调整速度
lastsection.style.height=availheight;
lastsection.style.overflow='visible';
lastsection.style.display='';
visibleheight=parseint(lastsection.clientheight);
if(visibleheight>availheight) {lastsection.style.overflow='auto';}else{lastsection.style.overflow='hidden';};
}
}
function slidemenu() {
// 菜单滑动函数
if(parseint(lastsection.style.height)>1) {
lastsection.style.height=parseint(parseint(lastsection.style.height)*aniratio);
thissection.style.height=availheight-parseint(lastsection.style.height);
var movetimer=settimeout("slidemenu()",timerdelay) ;
}else {
// 完成菜单滑动,显示新打开的菜单,隐藏前面以打开的菜单
lastsection.style.display='none';
thissection.style.height=availheight;
menuactive=false;
if (visibleheight>availheight) {thissection.style.overflow='auto';};
thissection.style.marginright=0;
lastsection=thissection;
cleartimeout(movetimer);
}
}
function startsection(thesection) {
// 开始滑动菜单,检测是否对菜单进行单击
if(menuactive==false) {
if(lastsection!=thesection) {
menuactive=true;
thissection=thesection;
lastsection.style.overflow='hidden';
thissection.style.overflow='visible';
thissection.style.display='';
visibleheight=parseint(thissection.clientheight);
thissection
| 对此文章发表了评论 |
