jQuery (edge), HTML, CSS, JavaScript
JS + CSS custom properties, Full code: w/ setTarget() function
JS + CSS custom properties, Full code: w/ scrollTop (10/10 Mister_JoJo)
setTarget() function. Responsive design + submenu
setTarget() function. Not Responsive
JS function to manipulate CSS custom properties: setTarget() function, w/o need for headerHeight2. No Submenu; Not Responsive.
JS function to manipulate CSS custom properties: setTarget() function; No Submenu; Not Responsive
JS function to manipulate CSS custom properties: setTarget() function
If .classList.contains()
Testing: Mister_JoJo's 10/14 answer with full code
Testing: Mister_JoJo's 10/10 answer with full code
No-Library (pure JS), HTML, CSS, JavaScript
Testing: Mister_JoJo's 10/10 answer with setTarget(). Submenu + responsive design
Testing: Mister_JoJo's 10/10 answer with setTarget()
Testing: Mister_JoJo's 10/10 answer
jQuery 1.9.1, HTML, CSS, JavaScript
TARGET POSITIONING: OPTIONS TRIED