SHOW:
|
|
- or go back to the newest paste.
1 | - | <script type="text/javascript"> |
1 | + | document.onload = function(){ |
2 | - | function init(){ |
2 | + | var wMenubar = document.getElementById("wMenuBar"), |
3 | - | wMenubar = document.getElementById("wMenuBar"); |
3 | + | wLogo = document.getElementById("wLogo"); |
4 | - | wLogo = document.getElementById("wLogo"); |
4 | + | window.onscroll = function (e){ |
5 | - | } |
5 | + | if(window.scrollY > 50){ |
6 | - | |
6 | + | wMenubar.className="small"; |
7 | - | window.onscroll = function (e){ |
7 | + | wLogo.src = "logo-small.png"; |
8 | - | if (window.scrollY > 50){ |
8 | + | }else{ |
9 | - | wMenubar.className="small"; |
9 | + | wMenubar.className="big"; |
10 | - | wLogo.src = "logo-small.png"; |
10 | + | wLogo.src = "logo.png"; |
11 | } | |
12 | - | else { |
12 | + | } |
13 | - | wMenubar.className="big"; |
13 | + | }; |