Changes

From Drawn to Life Wiki
Different approach
Line 63: Line 63:  
     })
 
     })
 
}
 
}
 +
 +
 +
$(function() {
 +
    //caches a jQuery object containing the header element
 +
    var header = $("#mw-header-container");
 +
    $(window).scroll(function() {
 +
        var scroll = $(window).scrollTop();
 +
 +
        if (scroll >= 200) {
 +
            header.addClass("headerblur");
 +
        } else {
 +
            header.removeClass("headerblur");
 +
        }
 +
    });
 +
});