Interactive Landing Page
This is a a multi-section landing page, with a dynamically updating navigational menu based on the sections of content that are added to the page. This project can be viewed on GitHub Pages: https://fastalana.github.io/Interactive-Landing-Page/
Useful Links
Udacity Information
This code was created for a project for the Udacity Front End Nanodegree. Resource links are listed below:
Javascript Functions Used In This Project
- MDN > Intersection Observer API - Asynchronously observe changes in the intersection of a target element with an ancestor element.
- MDN > Document.querySelector() - returns the first element (only) returned by the query.
- MDN > Document.querySelectorAll() - returns a static, NodeList of all instances returned by the query.
- MDN > Document.getElementById() - returns an Element object whose id property matches the specified string in the argument.
- MDN > Element.insertAdjacentHTML() - parses text as HTML, resulting in nodes that can be inserted directly into the DOM at a given position.
- MDN > Element.classList - returns a live DOMTokenList collection of all of the classes for a given element.
- MDN > forEach() - iterates once through each element in the array.
Credit
There are a lot of ways to do this project. I was inspired by Felix Geelhaar's approach, which leverages the Intersection Observer API, linked above.