HTML and CSS Reference
In-Depth Information
With the two views defined, you can now implement JavaScript code to enable navigation
between them.
3.1.2. Implementing navigation and state management in JavaScript
First, let's create an anonymous function block to ensure that the application doesn't pollute
the global JavaScript namespace. This block will initialize the application when the DOM
has finished loading.
Step 4: Initialize the application
Create a new file named app.js and save it in the same directory as the index.html file you
created previously. Add the contents of the following listing to this file.
Search WWH ::




Custom Search