Ist war noch nicht perfekt, aber dieser kleine Workaround würde dir wahrscheinlich schon viel bringen.
Du hast zur Zeit im Footer im script-Teil folgendes:
jQuery(window).scroll(function() {
if (jQuery(this).scrollTop()) {
jQuery('#toTop').fadeIn();
} else {
jQuery('#toTop').fadeOut();
}
});
Füge dafür folgenden Code ein:
jQuery(window).scroll(function() {
if (jQuery(this).scrollTop()) {
jQuery('#toTop').fadeIn();
} else {
jQuery('#toTop').fadeOut();
}
var menuHeight = jQuery( '.menu-hauptnavigation-container' ).height();
var acutalPage = '';
var actualWindowPosition = jQuery(window).scrollTop();
jQuery('section').each( function( i, val ) {
var sectionPart = jQuery( this );
var sectionID = sectionPart.attr( 'id' );
if( sectionPart.offset().top < ( actualWindowPosition + menuHeight ) ) {
acutalPage = sectionID;
}
});
var pushUrl = '';
if( acutalPage != '' ) {
pushUrl = '#' + acutalPage;
}
window.history.pushState(acutalPage, 'Titel', pushUrl);
});
Alles anzeigen
Also bei mir läuft es soweit, nur wenn man ganz nach oben scrollt, behält er #seite5.
Vielleicht kann das ja noch jemand erweitern, so dass an dieser Stelle auch passt.