Not logged in. Login

Assignment 3: Code Skeleton

I will give a simple page-flipper here to get you started with your Assignment3 story. Here is how I did the markup for the first three pages of my story:

<section id="p1">
<p>First page of the story.</p>
<section id="p2">
<p>Second page of the story.</p>
<section id="p3">
<p>Third page of the story.</p>
<div id="controls"><button id="continue">Continue</button></div>

This JavaScript will start on page 1, transition to page 2 when the button is clicked, and get ready for the page 2 to 3 transition (which you need to write). You are expected to make the transitions more interesting, and fill in the story.

to_p2 = function() {
  /* flip from p1 to p2 */
to_p3 = function() {
  /* flip from p2 to p3 */

setup = function() {

The .off() function used here removes the previously-applied click event handler so it no longer fires. After that, we replace it with a new event handler, thus changing the behaviour of the button.

Updated Sat Aug. 24 2019, 11:26 by ggbaker.