Advertisement
Eeems

Untitled

Oct 16th, 2013
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function __init__(){
  2.     if(typeof document.body != 'undefined'){
  3.         document.body.onload = function(){
  4.             var wMenubar = document.getElementById("wMenuBar"),
  5.                 wLogo = document.getElementById("wLogo");
  6.             window.onscroll = function (e){
  7.                 if(window.scrollY > 50){
  8.                     wMenubar.className="small";
  9.                     wLogo.src = "logo-small.png";
  10.                 }else{
  11.                     wMenubar.className="big";
  12.                     wLogo.src = "logo.png";
  13.                 }
  14.             }
  15.         };
  16.     }else{
  17.         setTimeout(__init__,10);
  18.     }
  19. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement