Hello
There is such code on jQuery, but I cannot rewrite it on native JS. Tell me how to do it:
var aboutUs = $('#about_us').offset().top; var quality = $('#quality').offset().top; if (scrolledFromTop > aboutUs && scrolledFromTop < quality) { $('.header__list li a').removeClass('active'); $('.about-us').addClass('active') }
thank
element.offsetTop
- Mr. Black