var sections = $("#home, #line-up-section, #tickets-section, #artists-announced-section, #getting-here-section, #store-section"); // or $("section"); $(window).scroll(function (event) { var scroll = $(window).scrollTop(); for(var i = 0; i < sections.length; i++) { var $section = $(sections[i]); if(scroll >= $section.offset().top) { // Will change URL without reloading, affecting the history history.replaceState("data", "title", location.origin + location.pathname + "#" + $section.attr('id')); } });

NEWS