//隐藏
function hideMessageBar(o,t,i,j,s){
var o = document.getElementById('NtalkerToolbar');
i=j=1;s=o.style;
t=setInterval(function(){
o.offsetTop<document.body.clientHeight?(s.top=(o.offsetTop+2)+"px"):clearInterval(t);
},15);
}
//显示
function showMessageBar(o,t,i,j,s){
var o = document.getElementById('NtalkerToolbar');
i=j=1;s=o.style;
t=setInterval(function(){
o.offsetTop>(document.body.clientHeight-34)?(s.top=(o.offsetTop-2)+"px"):clearInterval(t);
},15);
//显示后延迟10秒自动隐藏
setTimeout(hideMessageBar,10000);
}
转载于:https://www.cnblogs.com/xiongrx/archive/2011/12/16/5514527.html