O'Reilly logo

Web Design Blueprints by Benjamin LaGrone

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Dropping in the parallax game

Our next step is to jump right into the action and dump your parallax game file into the SPA framework. Since we have a pretty good systematic way to load scripts into the DOM, it should be pretty easy to shim it in and make it work.

We will further be moving the functions around to make them reusable patterns.

  1. Create a new directory in your project named level1. This is where we will place the work from the parallax project.
  2. Copy the index.html file into the level1 directory and then rename it to match the style of the routing registry, level.html.
  3. Then, create the additional new files level1.js, home-level1.html, and level1.json.

Let's add some CSS files to the directory so we can break it into small pieces. It's ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required