12 lines
254 B
JavaScript
12 lines
254 B
JavaScript
|
$(window).scroll(function() {
|
||
|
if ($(document).scrollTop() > 5) {
|
||
|
$('nav').addClass('shrink');
|
||
|
} else {
|
||
|
$('nav').removeClass('shrink');
|
||
|
}
|
||
|
});
|
||
|
|
||
|
$(window).scroll(function(){
|
||
|
$(".top").css("opacity", 1 - $(window).scrollTop() / 100);
|
||
|
});
|