The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript window scroll javascript error Re: window scroll javascript error


ah ok! but still getting the same error with that stripped down code. a thing that i notice though is that if i just keep 2 instances of the if ($(this).scrollTop() >= $('article[data-anchor="2013"]').offset().top) {
$('.navigation-timeline a').removeClass('active');
$('.navigation-timeline a:eq(0)').addClass('active');

the error disappears but if i had another one. it comes back again! so the scroll event is fired many times. is there anyway to prevent that?