src/main/javascript/scroll/plugin/floatz.scroll.plugin.header.js
/**
	 * Adjust scroll position on hash navigation.
	 * @param {boolean} onload True on page load, otherwise false
	 * @private
	 */
Adjust scroll position on hash navigation.
@param {boolean} onload True on page load, otherwise false
@private
Adjust scroll position on hash navigation . @param { boolean } onload True on page load otherwise false @private
_adjustScrollPosOnHashNavigation(onload) {
		if (window.location.hash.length > 0) {
			let hash = window.location.hash.substring(1); 
			let target = DOM.query(".flz-page-section")
				.find(section => section.data("id") === hash);
			if (!target) {
				target = DOM.queryById(hash);
			}
			if (target) {
				this.scroller().scrollTo(target, {
					complete: () => {
						if(onload) {
							if (!this._canHide) {
								window.setTimeout(() => {
									this._canHide = true;
								}, 1000);
							}
						}
					}
				});
			}
		}
	}
_adjustScrollPosOnHashNavigation ( onload ) { if ( window . location . hash . length > 0 ) { let hash = window . location . hash . substring ( 1 ) ; let target = DOM . query ( ".flz-page-section" ) . find ( section => section . data ( "id" ) === hash ) ; if ( ! target ) { target = DOM . queryById ( hash ) ; } if ( target ) { this . scroller ( ) . scrollTo ( target , { complete : ( ) => { if ( onload ) { if ( ! this . _canHide ) { window . setTimeout ( ( ) => { this . _canHide = true ; } , 1000 ) ; } } } } ) ; } } }
Adjust scroll position on hash navigation.
Adjust scroll position on hash navigation .
// Remove # // Try to find target in page sections (using its non-technical id) // Try to find target via its technical id // FIXME - Prevent hiding header when scrolling with hashes (initial load works) // Prevent hiding the header to early