<a href="javascript:(function(){if(window.fairyenvironment&&fairyenvironment.fairy){return init()}var s=document.documentelement.appendchild(document.createelement('script')),t=setinterval(function(){if(window.fairyenvironment&&fairyenvironment.fairy){clearinterval(t);s.parentnode.removechild(s);init()}},50);s.src='http://github.com/jamespadolsey/fairy/raw/master/fairy.js';function init(){var d=document.body.appendchild(document.createelement('div')),docel=document.documentelement,body=document.body,winheight,resize=function(){winheight=window.innerheight||docel.clientheight||body.clientheight;fairyenvironment.bounds.right=math.max(docel.clientwidth,docel.offsetwidth);scroll()},scroll=function(){fairyenvironment.bounds.top=math.max(~~window.pageyoffset,body.scrolltop,docel.scrolltop);fairyenvironment.bounds.left=math.max(~~window.pagexoffset,body.scrollleft,docel.scrollleft);fairyenvironment.bounds.bottom=fairyenvironment.bounds.top+winheight};resize();if(window.addeventlistener){window.addeventlistener('resize',resize,false);window.addeventlistener('scroll',scroll,false)}else{window.attachevent('onresize',resize);window.attachevent('onscroll',scroll)}fairyenvironment.spawn(25,function(){if(this.dom){d.appendchild(this.dom);this.start()}})}}());">clicking here</a>
Heres for details GitHub, and demo here's Fairies!.
Tidak ada komentar:
Posting Komentar