修复侧边栏bug

This commit is contained in:
nieguanghui 2014-01-24 15:43:35 +08:00
parent c26cb56193
commit 72bdadd497
1 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@
ele.style.position= 'absolute'; ele.style.position= 'absolute';
if(options.show){ if(options.show){
ele.style.top = ieScrollTop+pageHeight-options.top + "px"; ele.style.top = 0 + "px";
ele.style.display= 'block'; ele.style.display= 'block';
} }
@ -53,7 +53,7 @@
var ieScrollTop=window.pageYOffset || d.documentElement.scrollTop || d.body.scrollTop; var ieScrollTop=window.pageYOffset || d.documentElement.scrollTop || d.body.scrollTop;
ele.style.top = ieScrollTop+pageHeight - options.top + "px"; ele.style.top = 0 + "px";
if(options.autoHidden){ if(options.autoHidden){
if(ieScrollTop==0){ if(ieScrollTop==0){
ele.style.display="none"; ele.style.display="none";
@ -72,7 +72,7 @@
} }
} }
if(options.show) ele.style.display= 'block'; if(options.show) ele.style.display= 'block';
ele.style.top = pageHeight-options.top+'px'; ele.style.top = 0 +'px';
window.addEventListener('scroll',function (){ window.addEventListener('scroll',function (){
if(options.autoHidden){ if(options.autoHidden){
if(baidu.page.getScrollTop()==0){ if(baidu.page.getScrollTop()==0){