- var element = document.getElementById('portfolio-content-nav') + window.pageYOffset + 'px';
+ var element = document.getElementById('portfolio-content-nav');
window.addEventListener('scroll', function () {
- if (element > 100) {
+ if (window.scrollY > 100) {
element.classList.add("shadow");
} else {
element.classList.remove("shadow");
}
});
.pipe(sass())
надо .pipe(sass().on('error', sass.logError))
gulp.task('sass', function () {
return gulp.src('scss/style.scss')
.......
.pipe(sass().on('error', sass.logError))
.......
});