I have this code that on scroll adds a hash in the url based on the current section.
$(window).scroll(function(){
$('.eng-section').each(function(){
if ( $(this).offset().top < window.pageYOffset + 10 && $(this).offset().top + $(this).height() > window.pageYOffset + 10 ) {
window.location.hash = $(this).attr('id');
}
});
});
});
In chrome everything works fine, but in mozilla when the first hash is added in the url, scrolling doesn't seem to work anymore. Any ideas why this is happening?