Next, I want to move some more functions from level1.js
to the general pattern file levels.js
. We will cut out the moveRocket
and moveEarth
functions and paste them into levels.js
. And of course, rename them to levels.moveRocket
and levels.moveEarth
. And be sure to rename the function calls as well. Next, move the setElementLeftPostion
function to levels.js
. Rename it levels.setElementLeftPosition
and the function calls also. This function is called a number of times, so you may want to use a find and replace pattern, or at least find to identify them all. Next, move the window.smoothScrollTo
function into the levels.js
file and leave it as is.
Web Design Blueprints
Web Design Blueprints
Overview of this book
The book delivers simple instructions on how to design and build modern Web using the latest trends in web development. You will learn how to design responsive websites, created with modern Flat User Interface design patterns, build deep-scrolling websites with parallax 3D effects, and roll-your-own single-page applications. Finally, you'll work through an awesome chapter that combines them all.
Each chapter features actual lines of code that you can apply right away.
Table of Contents (12 chapters)
Web Design Blueprints
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Free Chapter
Responsive Web Design
Parallax Scrolling
Single Page Applications
The Death Star Chapter
Index
Customer Reviews