使用方法:
1.载入插件,在页面载入之后,window.onload = function(){}
2.创建需要跟随的对象的数组,比如 var followIds = [document.getElementById("follow"),document.getElementById("follow2")];
3.初始化Follow:new Follow();
4.传参,obj是对象数组,bottom是滚动块距离底部的最小的高度
<BR><script type="text/javascript" src="follow.js"></script><BR>window.onload = function(){<BR> var followIds = [document.getElementById("follow"),document.getElementById("follow2")];<BR> new Follow({<BR> obj:followIds,<BR> bottom:150<BR> });<BR>}<BR>
登录后复制