Guest User

Untitled

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