SHARE
TWEET


Apple's UK site billboard resizing JavaScript




Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- var HeroResize=AC.Class({initialize:function(b){this._height=null;this._hero=$(b);
- AC.Object.synthesize(this);this.__boundResizeHero=this.resizeHero.bindAsEventListener(this);
- if(typeof window.ontouchstart==="undefined"){this.resizeHero();Event.observe(window,"resize",this.__boundResizeHero)
- }},setHeight:function(b){this._height=(b<0)?0:b;return this._height},resizeHero:function(){this.setHeight(parseInt(window.innerHeight||(window.document.documentElement.clientHeight||window.document.body.clientHeight),10)-310);
- this.hero().style.height=this.height()+"px"}});Event.onDOMReady(function(){var b=new HeroResize("billboard")
- });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.