| Line 63: |
Line 63: |
| | }) | | }) |
| | } | | } |
| | + | |
| | + | |
| | + | var didScroll = false; |
| | + | |
| | + | $(window).scroll(function() { |
| | + | didScroll = true; |
| | + | }); |
| | + | |
| | + | setInterval(function() { |
| | + | if ( didScroll ) { |
| | + | didScroll = false; |
| | + | var $el; |
| | + | |
| | + | //Same that all the if else statements |
| | + | switch (true) { |
| | + | case (scroll >= 100): |
| | + | $el = $("#mw-header-container"); |
| | + | break; |
| | + | } |
| | + | |
| | + | //Removing blue class from all links |
| | + | $('#mw-header-container').addClass('headerblur'); |
| | + | } |
| | + | }, 50); |